This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Request for help


Hi 

Is the statement:

a[i]=a[i++]; a valid statement as per ANSI C standards or the behaviour
is undefined and the implementation is compiler dependent?

Looks like gcc is treating this as a[i]=a[i];i++; Where as the
programmers intention could be a[i+1]=a[i];i++;

Does the C language ANSI standard enforce any evaluation order or the
implementation is left to the compiler?

Thanks & Regards,
Srinivas.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]