public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29522]  New: [4.0 Regression] rejects valid template argument
@ 2006-10-20  7:23 pinskia at gcc dot gnu dot org
  2006-10-20  7:24 ` [Bug c++/29522] " pinskia at gcc dot gnu dot org
  2007-02-03 20:44 ` gdr at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-20  7:23 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
template< int C > int assertion_failed( int);
template< class >
struct N
{
  static int const okay = 1;
  static int const
    t = sizeof( assertion_failed<okay>( 0))
  ;
};
int main()
{
  N<int> n;
  return n.t;
}


-- 
           Summary: [4.0 Regression] rejects valid template argument
           Product: gcc
           Version: 4.0.4
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29522


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

* [Bug c++/29522] [4.0 Regression] rejects valid template argument
  2006-10-20  7:23 [Bug c++/29522] New: [4.0 Regression] rejects valid template argument pinskia at gcc dot gnu dot org
@ 2006-10-20  7:24 ` pinskia at gcc dot gnu dot org
  2007-02-03 20:44 ` gdr at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-20  7:24 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-10-20 07:24 -------
Note I could not find this bug filed so I filed it.  Also note I found it while
looking at PR 29518.
Oh and the error message is:
[pinskia@celery ~]$ ~/gcc-4.0/bin/gcc t.cc
t.cc: In instantiation of ‘const int N<int>::t’:
t.cc:13:   instantiated from here
t.cc:7: error: ‘N<int>::okay’ is not a valid template argument for type ‘int’
because it is a non-constant expression
t.cc:7: error: no matching function for call to ‘assertion_failed(int)’


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.0.4
      Known to work|                            |3.2.3 4.1.2 4.2.0
   Target Milestone|---                         |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29522


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

* [Bug c++/29522] [4.0 Regression] rejects valid template argument
  2006-10-20  7:23 [Bug c++/29522] New: [4.0 Regression] rejects valid template argument pinskia at gcc dot gnu dot org
  2006-10-20  7:24 ` [Bug c++/29522] " pinskia at gcc dot gnu dot org
@ 2007-02-03 20:44 ` gdr at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gdr at gcc dot gnu dot org  2007-02-03 20:44 -------
won't fix in GCC-4.0.x.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29522


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

end of thread, other threads:[~2007-02-03 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-20  7:23 [Bug c++/29522] New: [4.0 Regression] rejects valid template argument pinskia at gcc dot gnu dot org
2006-10-20  7:24 ` [Bug c++/29522] " pinskia at gcc dot gnu dot org
2007-02-03 20:44 ` gdr at gcc dot gnu dot org

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