This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22308] New: Failure to diagnose violation of constraint 6.516p2
- From: "neil at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jul 2005 12:06:33 -0000
- Subject: [Bug c/22308] New: Failure to diagnose violation of constraint 6.516p2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
With -ansi -pedantic-errors, GCC fails to reject the following assignment.
struct foo s;
volatile struct foo t;
struct foo { const int z; };
void bar (void)
{
t = s;
}
GCC is tricked by the delayed completion of a qualified form of the type.
--
Summary: Failure to diagnose violation of constraint 6.516p2
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: neil at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22308