This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38933] [4.3/4.4 Regression] fails to build code
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2009 12:57:47 -0000
- Subject: [Bug c++/38933] [4.3/4.4 Regression] fails to build code
- References: <bug-38933-11764@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-01-22 12:57 -------
Hm, I don't think this is valid:
enum Type { NAME, FACETS, TAGS, QUIET };
...
template<typename ITEMS, typename TAGS>
CollPrinter& operator=(const std::pair<ITEMS, TAGS>& data)
{
...
switch (m_type)
{
...
case TAGS:
is it? EDG rejects it with
t.3.ii(73): error: type name is not allowed
case TAGS:
^
Reduced testcase:
class Foo {
enum { TAGS = 1 };
template <typename TAGS>
void foo(TAGS x, int i)
{
switch (i) {
case TAGS:;
}
}
};
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |
Summary|[4.3/4.4 Regression] fails |[4.3/4.4 Regression] fails
|to build valid code |to build code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38933