aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gcc44
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2005-09-07 18:15:08 +0800
committerobrien <obrien@FreeBSD.org>2005-09-07 18:15:08 +0800
commitd78b6f0fb480c12d712de2eb847dfb807e584c2a (patch)
treec82e9a896e8c0685b2976d4466892ece642b95fd /lang/gcc44
parente577b14dd9b45a4fc0b3f59eb77f311b9df15224 (diff)
downloadfreebsd-ports-gnome-d78b6f0fb480c12d712de2eb847dfb807e584c2a.tar.gz
freebsd-ports-gnome-d78b6f0fb480c12d712de2eb847dfb807e584c2a.tar.zst
freebsd-ports-gnome-d78b6f0fb480c12d712de2eb847dfb807e584c2a.zip
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
Diffstat (limited to 'lang/gcc44')
-rw-r--r--lang/gcc44/files/patch-c-decl.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/gcc44/files/patch-c-decl.c b/lang/gcc44/files/patch-c-decl.c
new file mode 100644
index 000000000000..620989f79100
--- /dev/null
+++ b/lang/gcc44/files/patch-c-decl.c
@@ -0,0 +1,16 @@
+$FreeBSD$
+
+--- gcc/c-decl.c.orig Wed Aug 17 17:21:28 2005
++++ gcc/c-decl.c Wed Sep 7 02:18:44 2005
+@@ -1555,7 +1555,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 (OPT_Wredundant_decls, "redundant redeclaration of %q+D",
+ newdecl);