summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2010-05-23 12:25:17 +0000
committerespie <espie@openbsd.org>2010-05-23 12:25:17 +0000
commitd0b7f8ebf7e26aec7c43866ac769b0a63a1c26b6 (patch)
tree8b18c974087d4ec47a5972e018e8b9142b593cf8
parentmove hp300 to -D__hp300__; ok miod (diff)
downloadwireguard-openbsd-d0b7f8ebf7e26aec7c43866ac769b0a63a1c26b6.tar.xz
wireguard-openbsd-d0b7f8ebf7e26aec7c43866ac769b0a63a1c26b6.zip
GCC PR C++/33094.
C++ semantics fix. Member constants can be file-local, if they're not external. Fixes build of py-tagpy, which barfs in Boost otherwise. (original fix, different text from gcc 4.2.4) okay deraadt@, kettenis@
-rw-r--r--gnu/gcc/gcc/cp/decl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/cp/decl.c b/gnu/gcc/gcc/cp/decl.c
index 28e653b0751..1f18d854fef 100644
--- a/gnu/gcc/gcc/cp/decl.c
+++ b/gnu/gcc/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 (! TREE_PUBLIC (decl) || DECL_EXTERNAL (decl));
}
/* We don't create any RTL for local variables. */