aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 1bf7953..b29f6d2 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -3114,19 +3114,6 @@ do_identifier (token, parsing, args)
cp_error ("`%D' not defined", token);
id = error_mark_node;
}
- else if (in_call && ! flag_strict_prototype)
- {
- if (!id)
- id = implicitly_declare (token);
- else
- {
- /* Implicit declaration of built-in function. Don't
- change the built-in declaration, but don't let this
- go by silently, either. */
- cp_pedwarn ("implicit declaration of function `%D'", token);
- DECL_ANTICIPATED (id) = 0; /* only issue this warning once */
- }
- }
else if (current_function_decl == 0)
{
cp_error ("`%D' was not declared in this scope", token);
@@ -3256,17 +3243,11 @@ do_scoped_id (token, parsing)
LOOKUP_EXPR_GLOBAL (id) = 1;
return id;
}
- if (parsing && (yychar == '(' || yychar == LEFT_RIGHT)
- && ! flag_strict_prototype)
- id = implicitly_declare (token);
- else
- {
- if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
- cp_error ("`::%D' undeclared (first use here)", token);
- id = error_mark_node;
- /* Prevent repeated error messages. */
- SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
- }
+ if (IDENTIFIER_NAMESPACE_VALUE (token) != error_mark_node)
+ cp_error ("`::%D' undeclared (first use here)", token);
+ id = error_mark_node;
+ /* Prevent repeated error messages. */
+ SET_IDENTIFIER_NAMESPACE_VALUE (token, error_mark_node);
}
else
{