re PR c++/17695 (ICE in add_abstract_origin_attribute)
PR c++/17695 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they appear in a constructor/destructor that will be cloned. PR c++/17695 * g++.dg/debug/typedef2.C: New test. From-SVN: r89819
This commit is contained in:
parent
07c05acd82
commit
1dc82a999c
|
@ -1,3 +1,9 @@
|
||||||
|
2004-10-29 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
PR c++/17695
|
||||||
|
* decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
|
||||||
|
appear in a constructor/destructor that will be cloned.
|
||||||
|
|
||||||
1004-10-28 Matt Austern <austern@apple.com>
|
1004-10-28 Matt Austern <austern@apple.com>
|
||||||
|
|
||||||
PR c++/14124
|
PR c++/14124
|
||||||
|
|
|
@ -7619,6 +7619,14 @@ grokdeclarator (const cp_declarator *declarator,
|
||||||
error ("%Jtypedef name may not be a nested-name-specifier", decl);
|
error ("%Jtypedef name may not be a nested-name-specifier", decl);
|
||||||
if (!current_function_decl)
|
if (!current_function_decl)
|
||||||
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
|
DECL_CONTEXT (decl) = FROB_CONTEXT (current_namespace);
|
||||||
|
else if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (current_function_decl)
|
||||||
|
|| (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P
|
||||||
|
(current_function_decl)))
|
||||||
|
/* The TYPE_DECL is "abstract" because there will be
|
||||||
|
clones of this constructor/destructor, and there will
|
||||||
|
be copies of this TYPE_DECL generated in those
|
||||||
|
clones. */
|
||||||
|
DECL_ABSTRACT (decl) = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the user declares "typedef struct {...} foo" then the
|
/* If the user declares "typedef struct {...} foo" then the
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2004-10-29 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
PR c++/17695
|
||||||
|
* g++.dg/debug/typedef2.C: New test.
|
||||||
|
|
||||||
2004-10-29 David Billinghurst <David.Billinghurst@riotinto.com>
|
2004-10-29 David Billinghurst <David.Billinghurst@riotinto.com>
|
||||||
|
|
||||||
PR fortran/13490
|
PR fortran/13490
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
// PR c++/17695
|
||||||
|
|
||||||
|
template<typename T> struct A
|
||||||
|
{
|
||||||
|
T t;
|
||||||
|
A();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct B
|
||||||
|
{
|
||||||
|
B() { typedef int C; A<C> a; }
|
||||||
|
} b;
|
Loading…
Reference in New Issue