This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/21453] New: Assignments to conditional expressions
- From: "jozef dot behran at krs dot sk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 May 2005 15:21:50 -0000
- Subject: [Bug c/21453] New: Assignments to conditional expressions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
/*
This code fragment triggers an error at 4.1.0 complaining about an invalid lvalue
(in the assignment) but is compiled cleanly with older gcc version. No special flags
are required. This causes troubles with binutils compiled for
"i386-pc-mingw32msvc" as "ld" sources for that platform contain expressions
like the one below.
*/
int main(void)
{
int *p;
int *q;
int *r;
int i;
(i?p:q)=r;
return(0);
}
--
Summary: Assignments to conditional expressions
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jozef dot behran at krs dot sk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21453