In strict mode do not generate an implicit function declaration, but an error declara...
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 14:12:00 +0000 (14:12 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 15 Sep 2008 14:12:00 +0000 (14:12 +0000)
[r21973]

parser.c

index 1502d2e..09c521d 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -6050,11 +6050,9 @@ static expression_t *parse_reference(void)
        declaration_t *declaration = get_declaration(symbol, NAMESPACE_NORMAL);
 
        if (declaration == NULL) {
-               if (look_ahead(1)->type == '(') {
+               if (!strict_mode && look_ahead(1)->type == '(') {
                        /* an implicitly declared function */
-                       if (strict_mode) {
-                               errorf(HERE, "unknown symbol '%Y' found.", symbol);
-                       } else if (warning.implicit_function_declaration) {
+                       if (warning.implicit_function_declaration) {
                                warningf(HERE, "implicit declaration of function '%Y'",
                                        symbol);
                        }