public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/26572] New: Invalid local class definition not diagnosed
@ 2006-03-06 3:09 reichelt at gcc dot gnu dot org
2006-03-06 13:06 ` [Bug c++/26572] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-03-06 3:09 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet is accepted since at least GCC 2.95.3:
==================================
template<int> void foo()
{
struct A;
struct B : A {};
}
template void foo<0>();
==================================
As A is incomplete, the definition of the local class B should trigger
an error. This could already be diagnosed during definition of the
template function, but is not even diagnosed at instantiation time.
It is only diagnosed (at instantiation time) when B is used inside
the function (for example in a variable declaration "B b;").
--
Summary: Invalid local class definition not diagnosed
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: accepts-invalid, monitored
Severity: normal
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=26572
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/26572] Invalid local class definition not diagnosed
2006-03-06 3:09 [Bug c++/26572] New: Invalid local class definition not diagnosed reichelt at gcc dot gnu dot org
@ 2006-03-06 13:06 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-06 13:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-06 13:06 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |2.95.3 3.2.3 3.3.2 3.3.3
| |3.4.0 3.0.4 4.0.0
Last reconfirmed|0000-00-00 00:00:00 |2006-03-06 13:06:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26572
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-06 13:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 3:09 [Bug c++/26572] New: Invalid local class definition not diagnosed reichelt at gcc dot gnu dot org
2006-03-06 13:06 ` [Bug c++/26572] " pinskia 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).