public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9236: Initializing enum values with template arguments does not work
@ 2003-01-09 1:23 reichelt
0 siblings, 0 replies; 3+ messages in thread
From: reichelt @ 2003-01-09 1:23 UTC (permalink / raw)
To: bangerth, gcc-bugs, gcc-prs, nobody
Synopsis: Initializing enum values with template arguments does not work
State-Changed-From-To: open->closed
State-Changed-By: reichelt
State-Changed-When: Wed Jan 8 17:22:59 2003
State-Changed-Why:
Not a bug.
The compiler is (correctly) complaining about the
semicolon after "i=N". Just delete it and the code
compiles fine.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9236
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/9236: Initializing enum values with template arguments does not work
@ 2003-01-09 14:46 Wolfgang Bangerth
0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Bangerth @ 2003-01-09 14:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/9236; it has been noted by GNATS.
>From bangerth@ticam.utexas.edu Mon Jan 13 00:44:10 2003
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Volker Reichelt <reichelt@igpm.rwth-aachen.de>,
<bangerth@ticam.utexas.edu>, <gcc-bugs@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: Re: c++/9236: Initializing enum values with template arguments does
not work
Date: Thu, 9 Jan 2003 08:37:39 -0600 (CST)
> Synopsis: Initializing enum values with template arguments does not work
>
> State-Changed-From-To: open->closed
> The compiler is (correctly) complaining about the
> semicolon after "i=N". Just delete it and the code
> compiles fine.
How embarrassing :-( I apologize...
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/9236: Initializing enum values with template arguments does not work
@ 2003-01-09 1:06 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-01-09 1:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 9236
>Category: c++
>Synopsis: Initializing enum values with template arguments does not work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 08 17:06:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Wolfgang Bangerth
>Release: unknown-1.0
>Organization:
>Environment:
all gcc versions since at least 2.95
>Description:
Based on the assumption that initializers for local
static member variables and enums should have to fulfil
the same requirements (const-expr), I tried this:
--------------------------
template <int N> struct X {
static const int j=N;
enum I { i=N; };
};
--------------------------
However, while the static variable is ok, the enum member
is not:
tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc:3: error: expected `}'
x.cc:4: error: expected declaration
Is my understanding wrong, or is it gcc?
W.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-09 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-09 1:23 c++/9236: Initializing enum values with template arguments does not work reichelt
-- strict thread matches above, loose matches on Subject: below --
2003-01-09 14:46 Wolfgang Bangerth
2003-01-09 1:06 bangerth
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).