summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2011-07-30 17:27:29 +0000
committermm <mm@FreeBSD.org>2011-07-30 17:27:29 +0000
commit586f2662eb4f8fd000f1ce4541e3f0d89a88e019 (patch)
treebf690f79fc5deea4afeb339bba897ccaf4fef1a3 /contrib/gcc
parent645f499b5d3641bac9a4abe3b0e295baac6d3de6 (diff)
downloadFreeBSD-src-586f2662eb4f8fd000f1ce4541e3f0d89a88e019.zip
FreeBSD-src-586f2662eb4f8fd000f1ce4541e3f0d89a88e019.tar.gz
Fix invalid assertion of C++ external static data member declarations
as anonymous namespaces are local to the current translation. GCC PR: c++/33094 Reviewed by: uqs Approved by: re (kib) Obtained from: gcc (branches/redhat/gcc-4_1-branch, rev. 129554, GPLv2) MFC after: 1 week
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/cp/ChangeLog6
-rw-r--r--contrib/gcc/cp/decl.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog
index 3987547..7cd1fb4 100644
--- a/contrib/gcc/cp/ChangeLog
+++ b/contrib/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/33094
+ * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
+ constant to not have DECL_EXTERNAL if it's file-local.
+
2007-08-24 Jakub Jelinek <jakub@redhat.com>
PR c++/31941
diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c
index b837b14..4e3c6e9 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -4968,7 +4968,7 @@ make_rtl_for_nonlocal_decl (tree decl, tree init, const char* asmspec)
/* An in-class declaration of a static data member should be
external; it is only a declaration, and not a definition. */
if (init == NULL_TREE)
- gcc_assert (DECL_EXTERNAL (decl));
+ gcc_assert (DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl));
}
/* We don't create any RTL for local variables. */
OpenPOWER on IntegriCloud