/* 
  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

Reply via email to