summaryrefslogtreecommitdiff
path: root/lang/gcc34
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2005-09-07 10:15:08 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2005-09-07 10:15:08 +0000
commit9a1e2926b4af2bc07e1d5dca63f69a4651d905c6 (patch)
treeab4cc6b6262d8d157d1cdcbe2496b5c4c08449cd /lang/gcc34
parentUpdate to 1.00 (diff)
Fix bug where static forward declarations weren't accepted.
This allows us to fix non-ISO-C constructs in our kernel to legal ISO-C. Submitted by: rodrigc Obtained from: http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00006.html
Notes
Notes: svn path=/head/; revision=142157
Diffstat (limited to 'lang/gcc34')
-rw-r--r--lang/gcc34/files/patch-c-decl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/gcc34/files/patch-c-decl.c b/lang/gcc34/files/patch-c-decl.c
new file mode 100644
index 000000000000..cf7e46182736
--- /dev/null
+++ b/lang/gcc34/files/patch-c-decl.c
@@ -0,0 +1,16 @@
+$FreeBSD$
+
+--- gcc/c-decl.c.orig Mon Aug 8 00:42:26 2005
++++ gcc/c-decl.c Wed Sep 7 02:41:09 2005
+@@ -1271,7 +1271,10 @@ diagnose_mismatched_decls (tree newdecl,
+ && !(DECL_EXTERNAL (olddecl) && !DECL_EXTERNAL (newdecl))
+ /* Don't warn about forward parameter decls. */
+ && !(TREE_CODE (newdecl) == PARM_DECL
+- && TREE_ASM_WRITTEN (olddecl) && !TREE_ASM_WRITTEN (newdecl)))
++ && TREE_ASM_WRITTEN (olddecl) && !TREE_ASM_WRITTEN (newdecl))
++ /* Don't warn about a variable definition following a declaration. */
++ && !(TREE_CODE (newdecl) == VAR_DECL
++ && DECL_INITIAL (newdecl) && !DECL_INITIAL (olddecl)))
+ {
+ warning ("%Jredundant redeclaration of '%D'", newdecl, newdecl);
+ warned = true;