public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9978: [3.4 regression] Rejects valid constant expression
@ 2003-03-24 17:56 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2003-03-24 17:56 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, rguenth

Synopsis: [3.4 regression] Rejects valid constant expression

State-Changed-From-To: analyzed->closed
State-Changed-By: nathan
State-Changed-When: Mon Mar 24 17:47:39 2003
State-Changed-Why:
    2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
    
    	PR c++/9978, c++/9708
    	* cp-tree.h (instantiate_template): Add tsubst_flags parameter.
    	* call.c (add_template_candidate_real): Adjust
    	instantiate_template call.
    	* class.c (resolve_address_of_overloaded_function): Likewise.
    	* decl.c (build_enumerator): Set TREE_CONSTANT.
    	* pt.c (check_instantiated_args): New.
    	(push_inline_template_parms_recursive): Set TREE_CONSTANT,
    	TREE_READONLY.
    	(build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
    	(reduce_template_parm_level): Likewise.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9978


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/9978: [3.4 regression] Rejects valid constant expression
@ 2003-03-21 12:14 nathan
  0 siblings, 0 replies; 4+ messages in thread
From: nathan @ 2003-03-21 12:14 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nathan, nobody, rguenth

Synopsis: [3.4 regression] Rejects valid constant expression

Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-By: nathan
Responsible-Changed-When: Fri Mar 21 12:14:03 2003
Responsible-Changed-Why:
    working on it

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9978


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++/9978: [3.4 regression] Rejects valid constant expression
@ 2003-03-06 14:08 lerdsuwa
  0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2003-03-06 14:08 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rguenth

Synopsis: [3.4 regression] Rejects valid constant expression

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Thu Mar  6 14:08:16 2003
State-Changed-Why:
    Confirmed.  A regression from 3.3.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9978


^ permalink raw reply	[flat|nested] 4+ messages in thread

* c++/9978: [3.4 regression] Rejects valid constant expression
@ 2003-03-06  9:56 rguenth
  0 siblings, 0 replies; 4+ messages in thread
From: rguenth @ 2003-03-06  9:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9978
>Category:       c++
>Synopsis:       [3.4 regression] Rejects valid constant expression
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 06 09:56:02 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Richard Guenther
>Release:        g++-3.4 (GCC) 3.4 20030303 (experimental)
>Organization:
>Environment:

>Description:
The following is rejected by gcc 3.4 but accepted by icpc -ansi (who is I believe right in this case):

enum { val = 1 };

template <class T>
struct Bar
{
        static const int A = val;
        static const int B = A + 1;
};

this leads to

bellatrix:~/src/tests$ g++-3.4 -c cexpr.cpp 
cexpr.cpp:7: error: `Bar<T>::A' cannot appear in a constant-expression

substituting 1 for val solves the problem.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-24 17:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-24 17:56 c++/9978: [3.4 regression] Rejects valid constant expression nathan
  -- strict thread matches above, loose matches on Subject: below --
2003-03-21 12:14 nathan
2003-03-06 14:08 lerdsuwa
2003-03-06  9:56 rguenth

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).