diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-07-22 20:39:38 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-07-22 20:39:38 +0000 |
commit | 007685ac57d3c6e6bb79f6fd3196de4e0fdbacb2 (patch) | |
tree | d288a8fc351a5b9c9573cc466988e0c13f1d8992 /gnu/egcs/gcc/cp | |
parent | c8d99a034c0433d663255476b39af4a7ed758f0d (diff) |
Merge
Diffstat (limited to 'gnu/egcs/gcc/cp')
-rw-r--r-- | gnu/egcs/gcc/cp/Makefile.in | 2 | ||||
-rw-r--r-- | gnu/egcs/gcc/cp/decl.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/gnu/egcs/gcc/cp/Makefile.in b/gnu/egcs/gcc/cp/Makefile.in index 66cdf83df59..fd5434c1539 100644 --- a/gnu/egcs/gcc/cp/Makefile.in +++ b/gnu/egcs/gcc/cp/Makefile.in @@ -36,7 +36,7 @@ # It defines the c++ interface name. It should be changed when the # c++ interface is changed. -INTERFACE = 1 +INTERFACE = 2 # Variables that exist for you to override. # See below for how to change them for certain systems. diff --git a/gnu/egcs/gcc/cp/decl.c b/gnu/egcs/gcc/cp/decl.c index 8afa043173c..24968d0a670 100644 --- a/gnu/egcs/gcc/cp/decl.c +++ b/gnu/egcs/gcc/cp/decl.c @@ -3516,7 +3516,8 @@ duplicate_decls (newdecl, olddecl) TREE_TYPE (olddecl) = build_exception_variant (newtype, TYPE_RAISES_EXCEPTIONS (oldtype)); - if ((pedantic || ! DECL_IN_SYSTEM_HEADER (olddecl)) + if ((pedantic || (! DECL_IN_SYSTEM_HEADER (olddecl) + && ! DECL_IN_SYSTEM_HEADER (newdecl))) && DECL_SOURCE_LINE (olddecl) != 0 && flag_exceptions && ! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl))) @@ -11048,18 +11049,17 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL && ANON_AGGRNAME_P (TYPE_IDENTIFIER (type))) { + tree oldname = TYPE_NAME (type); + tree t; + /* FIXME: This is bogus; we should not be doing this for cv-qualified types. */ - /* For anonymous structs that are cv-qualified, need to use - TYPE_MAIN_VARIANT so that name will mangle correctly. As - type not referenced after this block, don't bother - resetting type to original type, ie. TREE_TYPE (decl). */ - type = TYPE_MAIN_VARIANT (type); - /* Replace the anonymous name with the real name everywhere. */ lookup_tag_reverse (type, declarator); - TYPE_NAME (type) = decl; + for (t = TYPE_MAIN_VARIANT (type); t; t = TYPE_NEXT_VARIANT (t)) + if (TYPE_NAME (t) == oldname) + TYPE_NAME (t) = decl; if (TYPE_LANG_SPECIFIC (type)) TYPE_WAS_ANONYMOUS (type) = 1; |