Re: output difference between VC and gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- On Sat, 7/17/10, Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote:

> From: Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx>
> Subject: Re: output difference between VC and gcc
> To: "Peter" <one2001boy@xxxxxxxxx>
> Cc: gcc-help@xxxxxxxxxxx
> Date: Saturday, July 17, 2010, 9:24 AM
> >     
>    printf("%d:%d\n",i,tab[i++]);
> 
> > based on C standard, whose output is correct?
> 
> The program exhibits undefined behaviour: it reads "i"
> twice while also
> writing it, without any intervening sequence point. 
> See e.g. 6.5/2 in
> the C99 standard.
> 
> 

Thanks so much for everybody's help.
I am impressed with so many knowledge person around here.

Peter

> Segher
> 
> 







[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux