diff options
author | ed <ed@FreeBSD.org> | 2009-12-30 22:46:08 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-12-30 22:46:08 +0000 |
commit | 1126c5fc83d25cb91e0ba91526c39727eebf98b1 (patch) | |
tree | 063494de837ee7dcc4f95044092aee0ccbf2cbd1 /usr.bin/yacc | |
parent | 9d473f39f1650064c6054d0737e0162563b075b5 (diff) | |
download | FreeBSD-src-1126c5fc83d25cb91e0ba91526c39727eebf98b1.zip FreeBSD-src-1126c5fc83d25cb91e0ba91526c39727eebf98b1.tar.gz |
Let both yacc and lex generate code that passes -Wold-style-definition.
Both these tools emit code where several functions have no `void'
keyword placed in the arugment list when the function has no arguments.
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r-- | usr.bin/yacc/skeleton.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/yacc/skeleton.c b/usr.bin/yacc/skeleton.c index 8ff7c8a..434a7c2 100644 --- a/usr.bin/yacc/skeleton.c +++ b/usr.bin/yacc/skeleton.c @@ -140,7 +140,11 @@ const char *header[] = const char *body[] = { "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", + "#if defined(__cplusplus) || __STDC__", + "static int yygrowstack(void)", + "#else", "static int yygrowstack()", + "#endif", "{", " int newsize, i;", " short *newss;", |