This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/8929: g++ 3.2 violates 14.7.3, p5
- From: sebor at roguewave dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 13 Dec 2002 17:35:42 -0000
- Subject: c++/8929: g++ 3.2 violates 14.7.3, p5
- Reply-to: sebor at roguewave dot com
>Number: 8929
>Category: c++
>Synopsis: g++ 3.2 violates 14.7.3, p5
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 13 09:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: sebor@roguewave.com
>Release: 3.2
>Organization:
>Environment:
>Description:
This was first reported against 2.95.2 on 12/1/99. The bug is still present in 3.2. The compiler fails to reject the following ill-formed program.
Regards
Martin
$ cat t.cpp; gcc --version; gcc t.cpp -c; echo $?
template<class T> struct A {
void f(T) { /* ... */ }
static const bool b = false;
};
template<> struct A<int> {
void f(int);
static const bool b;
};
// explicit specialization syntax not used for a member of
// explicitly specialized class template specialization
void A<int>::f(int) { /* ... */ }
template<> const bool A<int>::b = true; // <-- error
gcc (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: