public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/45747] New: Enums are stronger than templates
@ 2010-09-22 15:18 gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:20 ` [Bug c++/45747] " gcc at magfr dot user dot lysator dot liu dot se
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gcc at magfr dot user dot lysator dot liu dot se @ 2010-09-22 15:18 UTC (permalink / raw)
To: gcc-bugs
If a class is declared with an inner enum with a value, say foo, and also with
an inner template class that takes a non-type parameter named foo then inside
methods in the inner class the value of foo is the value of the enum value and
not the template parameter.
This seems odd and comeau does it the other way.
--
Summary: Enums are stronger than templates
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc at magfr dot user dot lysator dot liu dot se
GCC host triplet: i686-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45747
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/45747] Enums are stronger than templates
2010-09-22 15:18 [Bug c++/45747] New: Enums are stronger than templates gcc at magfr dot user dot lysator dot liu dot se
@ 2010-09-22 15:20 ` gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:27 ` redi at gcc dot gnu dot org
2010-09-22 15:58 ` gcc at magfr dot user dot lysator dot liu dot se
2 siblings, 0 replies; 4+ messages in thread
From: gcc at magfr dot user dot lysator dot liu dot se @ 2010-09-22 15:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from gcc at magfr dot user dot lysator dot liu dot se 2010-09-22 15:19 -------
Created an attachment (id=21861)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21861&action=view)
Test case showing the bug
Compile with
g++ enums-and-template-params.cpp
to trigger the bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45747
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/45747] Enums are stronger than templates
2010-09-22 15:18 [Bug c++/45747] New: Enums are stronger than templates gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:20 ` [Bug c++/45747] " gcc at magfr dot user dot lysator dot liu dot se
@ 2010-09-22 15:27 ` redi at gcc dot gnu dot org
2010-09-22 15:58 ` gcc at magfr dot user dot lysator dot liu dot se
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-09-22 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from redi at gcc dot gnu dot org 2010-09-22 15:27 -------
Looks like a dup of PR 45625
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45747
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/45747] Enums are stronger than templates
2010-09-22 15:18 [Bug c++/45747] New: Enums are stronger than templates gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:20 ` [Bug c++/45747] " gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:27 ` redi at gcc dot gnu dot org
@ 2010-09-22 15:58 ` gcc at magfr dot user dot lysator dot liu dot se
2 siblings, 0 replies; 4+ messages in thread
From: gcc at magfr dot user dot lysator dot liu dot se @ 2010-09-22 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from gcc at magfr dot user dot lysator dot liu dot se 2010-09-22 15:58 -------
I agree.
*** This bug has been marked as a duplicate of 45625 ***
--
gcc at magfr dot user dot lysator dot liu dot se changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45747
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-22 15:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-22 15:18 [Bug c++/45747] New: Enums are stronger than templates gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:20 ` [Bug c++/45747] " gcc at magfr dot user dot lysator dot liu dot se
2010-09-22 15:27 ` redi at gcc dot gnu dot org
2010-09-22 15:58 ` gcc at magfr dot user dot lysator dot liu dot se
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).