diff options
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 35f3d29..8272d33 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4072,6 +4072,11 @@ start_decl (struct c_declarator *declarator, struct c_declspecs *declspecs, record_inline_static (input_location, current_function_decl, decl, csi_modifiable); + if (c_dialect_objc () + && (TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FUNCTION_DECL)) + objc_check_global_decl (decl); + /* Add this decl to the current scope. TEM may equal DECL or it may be a previous decl of the same name. */ tem = pushdecl (decl); |