public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4429: certain member variables that shadow template parameters cause ice.
@ 2002-10-31 14:08 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-10-31 14:08 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, xternal

Synopsis: certain member variables that shadow template parameters cause ice.

State-Changed-From-To: analyzed->closed
State-Changed-By: bangerth
State-Changed-When: Thu Oct 31 14:08:17 2002
State-Changed-Why:
    With 3.3pre, I now get
    tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -W -Wall -c y.cc
    y.cc:6: warning: `static' is not at beginning of declaration
    y.cc:6: error: declaration of `const MyClass TestTemplate<type>::type[]'
    y.cc:4: error:  shadows template parm `char type'
    
    It still fails with 3.2.1, but is not a regression.

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


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

* Re: c++/4429: certain member variables that shadow template parameters cause ice.
@ 2002-06-07  7:52 lerdsuwa
  0 siblings, 0 replies; 3+ messages in thread
From: lerdsuwa @ 2002-06-07  7:52 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, xternal

Synopsis: certain member variables that shadow template parameters cause ice.

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Jun  7 07:52:34 2002
State-Changed-Why:
    Confirmed.

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


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

* c++/4429: certain member variables that shadow template parameters cause ice.
@ 2001-09-30 17:26 xternal
  0 siblings, 0 replies; 3+ messages in thread
From: xternal @ 2001-09-30 17:26 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4429
>Category:       c++
>Synopsis:       certain member variables that shadow template parameters cause ice.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 30 17:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     xternal@centibyte.org
>Release:        gcc version 3.0.2 20010922 (Debian prerelease)
>Organization:
>Environment:
)gured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
Array member variables that are declared const and static and shadow a template parameter cause an ice.  The template parameter must be a built in type, and the array member an array of classes.

If the variable is not declared const or static, or it is a builtin type, or if the template parameter is not a builtin type, a normal syntax error message will result instead.

I got the same results with g++ 3.0.2 and g++ 2.95.4.
>How-To-Repeat:
Run the followingn command on the following file:

g++ bugtest.cc

//bugtest.ccclass MyClass {
};

template<char type> class TestTemplate {
public:
	 const static MyClass type[] = {MyClass(), MyClass()};
};

>Fix:
Change one of the variable names.
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-10-31 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31 14:08 c++/4429: certain member variables that shadow template parameters cause ice bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-06-07  7:52 lerdsuwa
2001-09-30 17:26 xternal

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