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

Bug#376901: gcc4 (*p)+=(*p=6) bug



On Wed, Jul 05, 2006 at 06:20:27PM +0200, NyOS wrote:
>   printf("a:%d t[0]:%d *p:%d\n",a,t[0],*p);
>   a+=(a=2)+(a=3);

Modifies one value multiple times without sequence point: Undefined
behaviour.

>   t[0]+=(t[0]=2)+(t[0]=3);

Modifies one value multiple times without sequence point: Undefined
behaviour.

>   (*p)+=((*p)=2)+((*p)=3);

Modifies one value multiple times without sequence point: Undefined
behaviour.

Bastian

-- 
Death, when unnecessary, is a tragic thing.
		-- Flint, "Requiem for Methuselah", stardate 5843.7



Reply to: