------- Comment #2 from jason at gcc dot gnu dot org 2006-08-22 20:41 -------
This testcase reproduces the bug without new. The problem is that applying
attributes to a type creates a new TYPE_MAIN_VARIANT, which is fundamentally
nonsensical for class types. We really need to impose more design on the whole
attribute system.
IMO we should give an error for this code.
struct A
{
A(int) { }
};
int main()
{
A a = (A __attribute__((unused)))0;
}
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28558