public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32384]  New: [4.1/4.2/4.3 regression] Pseudo-dtor in template class rejected
@ 2007-06-17 23:10 reichelt at gcc dot gnu dot org
  2007-06-17 23:11 ` [Bug c++/32384] " reichelt at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-06-17 23:10 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet is rejected since GCC 3.4.0:

=====================================================
template<typename> struct A
{
  typedef int T;
  T foo();

  A() { foo().~T(); }
};

A<int> a;
=====================================================

The error message is:
bug.cc: In constructor 'A< <template-parameter-1-1> >::A()':
bug.cc:6: error: expected class-name before '(' token

The code compiles if A is a non-template class, or if I remove the typedef
and call the anonymous template parameter "T" instead.


-- 
           Summary: [4.1/4.2/4.3 regression] Pseudo-dtor in template class
                    rejected
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-03-30 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-17 23:10 [Bug c++/32384] New: [4.1/4.2/4.3 regression] Pseudo-dtor in template class rejected reichelt at gcc dot gnu dot org
2007-06-17 23:11 ` [Bug c++/32384] " reichelt at gcc dot gnu dot org
2007-06-29 18:47 ` mmitchel at gcc dot gnu dot org
2007-10-31 12:31 ` jakub at gcc dot gnu dot org
2007-11-01 22:54 ` jakub at gcc dot gnu dot org
2007-11-01 23:10 ` [Bug c++/32384] [4.1/4.2 " jakub at gcc dot gnu dot org
2008-07-04 22:14 ` [Bug c++/32384] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-30 22:08 ` jsm28 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).