gcc not warning on all occurences of operations with undefined results?

Daniel Kabs daniel.kabs@gmx.de
Wed Nov 16 11:13:00 GMT 2005


Hello Ladislav!

On Tuesday 15 November 2005 21:33, Ladislav Mecir wrote:
> >But why doesn't gcc warn about this code
> >
> >  s.a = s.a++;
> >  p->a = p->a++;
>
> because in both these cases the result *is* defined

I do not understand, why are those operations defined, but

i = i++;

is not? I fail to see the relevant difference in these assigments.

Thanks for your help,

Cheers
Daniel



More information about the Gcc-help mailing list