public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30924]  New: Array of pointer type argument in partial template specialization fails
@ 2007-02-22 10:06 enok at lysator dot liu dot se
  2007-02-22 10:17 ` [Bug c++/30924] " enok at lysator dot liu dot se
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: enok at lysator dot liu dot se @ 2007-02-22 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

A quite simple array specialization construct is rejected by g++ with a
compiler error message. Not being a language specialist icc 9.1 accepts the
code even with -strict-ansi flag. Allegedly also comeau accepts the code. The
g++ compiler error message is also pretty strange and indicates a compiler bug.

template<typename T>
struct x {};

template<typename T, unsigned N>
struct x<T*[N]> {};

int main() {
  x<int> a;
  x<int*[10]> b;
  return 0;
}

bash> g++-4.1.2 -c tst.cpp
tst.cpp:7: error: template parameters not used in partial
specialization: tst.cpp:7: error:         ‘T’


-- 
           Summary: Array of pointer type argument in partial template
                    specialization fails
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: enok at lysator dot liu dot se
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2008-07-04 16:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 10:06 [Bug c++/30924] New: Array of pointer type argument in partial template specialization fails enok at lysator dot liu dot se
2007-02-22 10:17 ` [Bug c++/30924] " enok at lysator dot liu dot se
2007-02-22 23:43 ` [Bug c++/30924] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-03-05  4:09 ` mmitchel at gcc dot gnu dot org
2007-03-10  0:03 ` mmitchel at gcc dot gnu dot org
2007-03-10 19:49 ` [Bug c++/30924] [4.1 " mmitchel at gcc dot gnu dot org
2008-07-04 16:02 ` 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).