public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28886]  New: [4.1/4.2 regression] Template specialization with array rejected
@ 2006-08-29 10:51 reichelt at gcc dot gnu dot org
  2006-08-29 10:51 ` [Bug c++/28886] " reichelt at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 19+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-08-29 10:51 UTC (permalink / raw)
  To: gcc-bugs

The following IMHO valid testcase is rejected on mainline and the 4.1
branch since a couple of days:

============================================================
template<typename> struct A;

template<typename T, int N> struct A<T[N]> {};

template<typename T, int N> struct A<const T[N]> {};

A<const int[1]> a;
============================================================

bug.cc:7: error: ambiguous class template instantiation for 'struct A<const int
[1]>'
bug.cc:3: error: candidates are: struct A<T [N]>
bug.cc:5: error:                 struct A<const T [N]>
bug.cc:7: error: aggregate 'A<const int [1]> a' has incomplete type and cannot
be defined

The testcase is similar to the testcase g++.dg/template/partial3.C
which still passes. The major difference is that we have a "int N"
here and an "unsigned N" in the testsuite.

Mark, this is due to your fix for PR 28595
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00991.html
Would you mind having a look?


-- 
           Summary: [4.1/4.2 regression] Template specialization with array
                    rejected
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, monitored
          Severity: major
          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=28886


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

end of thread, other threads:[~2006-09-08  0:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-29 10:51 [Bug c++/28886] New: [4.1/4.2 regression] Template specialization with array rejected reichelt at gcc dot gnu dot org
2006-08-29 10:51 ` [Bug c++/28886] " reichelt at gcc dot gnu dot org
2006-08-30  4:01 ` pinskia at gcc dot gnu dot org
2006-08-30  5:25 ` pinskia at gcc dot gnu dot org
2006-09-01 22:19 ` mmitchel at gcc dot gnu dot org
2006-09-01 22:24 ` pinskia at gcc dot gnu dot org
2006-09-01 22:30 ` mark at codesourcery dot com
2006-09-02  1:39   ` Andrew Pinski
2006-09-02  1:37 ` pinskia at gcc dot gnu dot org
2006-09-02  1:39 ` pinskia at physics dot uc dot edu
2006-09-02  3:51 ` mark at codesourcery dot com
2006-09-02  4:01 ` pinskia at gcc dot gnu dot org
2006-09-04  2:58 ` pinskia at gcc dot gnu dot org
2006-09-04  3:02 ` pinskia at gcc dot gnu dot org
2006-09-04 18:57 ` mmitchel at gcc dot gnu dot org
2006-09-07  1:05 ` mmitchel at gcc dot gnu dot org
2006-09-07  1:11 ` mmitchel at gcc dot gnu dot org
2006-09-08  0:05 ` [Bug c++/28886] [4.1 " mmitchel at gcc dot gnu dot org
2006-09-08  0:05 ` mmitchel 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).