summaryrefslogtreecommitdiffstats
path: root/test/YACC
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-01-17 21:21:15 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-01-17 21:21:15 (GMT)
commit49bb971fdcb7c54c5044f5854de3c177a6f41d1f (patch)
tree38615d941b97801f4feae21441985d01763e067f /test/YACC
parentd59da7c8d278e1c37f05ce01ca1a14125295ac15 (diff)
downloadSCons-49bb971fdcb7c54c5044f5854de3c177a6f41d1f.zip
SCons-49bb971fdcb7c54c5044f5854de3c177a6f41d1f.tar.gz
SCons-49bb971fdcb7c54c5044f5854de3c177a6f41d1f.tar.bz2
fix C code in yacc file to be pass default compiler warnings
Diffstat (limited to 'test/YACC')
-rw-r--r--test/YACC/live.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/YACC/live.py b/test/YACC/live.py
index d567ec3..f6733da 100644
--- a/test/YACC/live.py
+++ b/test/YACC/live.py
@@ -61,20 +61,23 @@ foo.CFile(target = 'not_foo', source = 'foo.y')
yacc = r"""
%%{
#include <stdio.h>
+extern int yyparse();
+int yyerror(char *s);
+int yylex();
-main()
+int main()
{
- yyparse();
+ return yyparse();
}
-yyerror(s)
+int yyerror(s)
char *s;
{
fprintf(stderr, "%%s\n", s);
return 0;
}
-yylex()
+int yylex()
{
int c;