public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9057: partial template specialization appears to be ignored
@ 2002-12-29 10:09 lerdsuwa
  0 siblings, 0 replies; 4+ messages in thread
From: lerdsuwa @ 2002-12-29 10:09 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, sneechy

Synopsis: partial template specialization appears to be ignored

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Sun Dec 29 10:09:53 2002
State-Changed-Why:
    Confirmed.

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


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

* Re: c++/9057: partial template specialization appears to be ignored
@ 2003-01-22 22:25 bangerth
  0 siblings, 0 replies; 4+ messages in thread
From: bangerth @ 2003-01-22 22:25 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, sneechy

Synopsis: partial template specialization appears to be ignored

State-Changed-From-To: analyzed->closed
State-Changed-By: bangerth
State-Changed-When: Wed Jan 22 22:25:10 2003
State-Changed-Why:
    Volker is right, the code is illegal.

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


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

* Re: c++/9057: partial template specialization appears to be ignored
@ 2003-01-06 12:56 Volker Reichelt
  0 siblings, 0 replies; 4+ messages in thread
From: Volker Reichelt @ 2003-01-06 12:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9057; it has been noted by GNATS.

From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, sneechy@hotmail.com, gcc-bugs@gcc.gnu.org
Cc:  
Subject: Re: c++/9057: partial template specialization appears to be ignored
Date: Mon, 6 Jan 2003 14:51:25 +0100

 Hi,
 
 I think gcc is right and the code is actually ill-formed:
 If you write
 
   template <typename U> struct B<A::i, U> {};
 
 instead of
 
   template <typename U> struct B<i, U> {};
 
 the code compiles fine. Since "i" is actually dependant on the template
 parameter "T", that's how you have to do it IMHO.
 
 I'm not 100% sure, however, so I leave this PR open for the experts.
 
 Regards,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9057
 
 
 


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

* c++/9057: partial template specialization appears to be ignored
@ 2002-12-25  7:26 sneechy
  0 siblings, 0 replies; 4+ messages in thread
From: sneechy @ 2002-12-25  7:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9057
>Category:       c++
>Synopsis:       partial template specialization appears to be ignored
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 25 07:26:05 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     sneechy@hotmail.com
>Release:        gcc version 3.2 (mingw special 20020817-1)
>Organization:
>Environment:
gcc version 3.2 (mingw special 20020817-1)
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
>Description:
Compiling the following code:

  template <typename T>
  struct A
  {
    template <int, typename U>
    struct B;

    enum { i = 0 };

    template <typename U>
    struct B<i, U> {};
  };

  int j = sizeof(A<void>::B<0, void>);

results in the following error (on the 'int j = ..' line):

  `sizeof' applied to incomplete type `A<void>::B<0, void>'

I've lozalized and simplified the problem as much as I could. Everything that is left somehow contributes to the conditions that create this problem. Somehow the B partial specialization appears to be ignored because it was specialized using an enumeration value from this particular context. G++ does accept the code if the enumeration is moved outside A.

Comeau compiles the code without problems.
>How-To-Repeat:
See description.
>Fix:
No idea.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-01-22 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-29 10:09 c++/9057: partial template specialization appears to be ignored lerdsuwa
  -- strict thread matches above, loose matches on Subject: below --
2003-01-22 22:25 bangerth
2003-01-06 12:56 Volker Reichelt
2002-12-25  7:26 sneechy

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