aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJames A. Morrison <phython@gcc.gnu.org>2004-12-21 17:07:06 +0000
committerJames A. Morrison <phython@gcc.gnu.org>2004-12-21 17:07:06 +0000
commitebef4d30443353b9cf4b2b559b2429273b60065b (patch)
tree0add9045f20f4db5dba3f2c3bb1fec81d63bfa1f /gcc/c-decl.c
parent6f17bbcf0518928c510fcc8c7bbb48c0ec21a8f3 (diff)
downloadgcc-ebef4d30443353b9cf4b2b559b2429273b60065b.zip
gcc-ebef4d30443353b9cf4b2b559b2429273b60065b.tar.gz
gcc-ebef4d30443353b9cf4b2b559b2429273b60065b.tar.bz2
re PR c/18963 (static and nested declarations cause an ice)
2004-12-21 James A. Morrison <phython@gcc.gnu.org> PR c/18963 * c-decl.c (pushdecl): Remove block trying to merge static function declarations at block scope to file scope declarations. testsuite: PR c/18963 * gcc.dg/pr18963-1.c: New test. From-SVN: r92460
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f881ea8..975e281 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2069,30 +2069,6 @@ pushdecl (tree x)
}
}
}
- /* Similarly, a declaration of a function with static linkage at
- block scope must be checked against any existing declaration
- of that function at file scope. */
- else if (TREE_CODE (x) == FUNCTION_DECL && scope != file_scope
- && !TREE_PUBLIC (x) && !DECL_INITIAL (x))
- {
- if (warn_nested_externs && !DECL_IN_SYSTEM_HEADER (x))
- warning ("nested static declaration of %qD", x);
-
- while (b && !B_IN_FILE_SCOPE (b))
- b = b->shadowed;
-
- if (b && same_translation_unit_p (x, b->decl)
- && duplicate_decls (x, b->decl))
- {
- bind (name, b->decl, scope, /*invisible=*/false, /*nested=*/true);
- return b->decl;
- }
- else
- {
- bind (name, x, file_scope, /*invisible=*/true, /*nested=*/false);
- nested = true;
- }
- }
warn_if_shadowing (x);