This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20589] error: '<anonymous enum>' is/uses anonymous type'
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2005 04:20:03 -0000
- Subject: [Bug c++/20589] error: '<anonymous enum>' is/uses anonymous type'
- References: <20050322154540.20589.caolanm@redhat.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2005-03-26 04:20 -------
Subject: Re: error: '<anonymous enum>' is/uses anonymous type'
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| Intuitively, C++ treats unnamed enums differently than named ones, because
| in templates the function/class name has to be mangled, and will contain
| the name of the template arguments. If the template argument doesn't have
| a name, then the compiler can't do its job, so the standard chose to
| disallow unnamed enums as template arguments.
|
I know what the standard says, but the arguments used to make that rule
are bogus. Those are on my list of things to fix for C++0x.
If it were only mnagling, then the compiler can concoct a unique name
for manglaing purposes.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20589