diff --git a/test/compare_parsers/ansic.y b/test/compare_parsers/ansic.y index 0e18a69..4f8ab96 100644 --- a/test/compare_parsers/ansic.y +++ b/test/compare_parsers/ansic.y @@ -26,6 +26,7 @@ %{ #define YYSTYPE string_t +int yyerror(char* s); %} %token IDENTIFIER CONSTANT STRING_LITERAL SIZEOF @@ -471,8 +472,7 @@ identifier extern int column; extern int line; -yyerror(s) -char *s; +int yyerror(char* s) { fprintf (stderr, "syntax error line - %d, column - %d\n", line, column + 1); } diff --git a/test/compare_parsers/test_yaep.c b/test/compare_parsers/test_yaep.c index 2ce2171..698db37 100644 --- a/test/compare_parsers/test_yaep.c +++ b/test/compare_parsers/test_yaep.c @@ -827,7 +827,7 @@ static const char *description = #include #endif -main (int argc, char **argv) +int main (int argc, char **argv) { ticker_t t; int code, ambiguous_p; diff --git a/test/compare_parsers/test_yyparse.c b/test/compare_parsers/test_yyparse.c index b50b06e..c563ed0 100644 --- a/test/compare_parsers/test_yyparse.c +++ b/test/compare_parsers/test_yyparse.c @@ -40,6 +40,7 @@ static int level = 0; #include "test_common.c" +extern int get_lex (void); #define yylex get_lex #include "y.tab.c" #undef yylex @@ -100,7 +101,7 @@ static void store_lexs( YaepAllocator * alloc ) { } } -main() +int main() { ticker_t t; int code;