mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
339772b003
commit
6cf3367c6d
2 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue