public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18770] New: g++ accepts invalid code
@ 2004-12-01 23:06 seefeld at sympatico dot ca
2004-12-01 23:21 ` [Bug c++/18770] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: seefeld at sympatico dot ca @ 2004-12-01 23:06 UTC (permalink / raw)
To: gcc-bugs
According to ISO/IEC 14882 6.4-3, the following snippet is ill-formed:
if (int x = 1)
{
int x = 2; // redeclaration of x
}
Yet the g++ versions that come with Fedora Core 3 accept it.
Specifically, these versions are:
gcc version 3.3.4 20040817 (Red Hat Linux 3.3.4-2)
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
gcc version 4.0.0 20041019 (Red Hat 4.0.0-0.8)
--
Summary: g++ accepts invalid code
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: seefeld at sympatico dot ca
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: GNU/Linux x86
GCC host triplet: GNU/Linux x86
GCC target triplet: GNU/Linux x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18770
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/18770] g++ accepts invalid code
2004-12-01 23:06 [Bug c++/18770] New: g++ accepts invalid code seefeld at sympatico dot ca
@ 2004-12-01 23:21 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-01 23:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-01 23:21 -------
Note this is the full testcase:
void f()
{
if (int x = 1)
{
int x = 2; // redeclaration of x
}
}
Confirmed, This is related to PR 2288.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |2288
OtherBugsDependingO| |12944
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2004-12-01 23:21:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18770
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-01 23:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 23:06 [Bug c++/18770] New: g++ accepts invalid code seefeld at sympatico dot ca
2004-12-01 23:21 ` [Bug c++/18770] " 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).