Re: Assignment to volatile objects

2012-02-03 Thread Vincent Lefevre
On 2012-01-31 09:16:09 +0100, David Brown wrote: > For normal variables, "a = b = 0" is just ugly - but that is a > matter of opinion. and it is handled badly by GCC: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52106 (this is just a missing warning... Still, inconsistency is bad.) -- Vincent

Re: Assignment to volatile objects

2012-01-31 Thread David Brown
On 30/01/2012 23:59, Zoltán Kócsi wrote: David Brown wrote: Until gcc gets a feature allowing it to whack the programmer on the back of the head with Knuth's "The Art of Computer Programming" for writing such stupid code that relies on the behaviour of volatile "a = b = 0;", then a warning see

Re: Assignment to volatile objects

2012-01-30 Thread Gabriel Dos Reis
On Mon, Jan 30, 2012 at 8:20 PM, Zoltán Kócsi wrote: > On Mon, 30 Jan 2012 19:51:47 -0600 > Gabriel Dos Reis wrote: > >> On Mon, Jan 30, 2012 at 4:59 PM, Zoltán Kócsi wrote: >> > David Brown wrote: >> > >> >> Until gcc gets a feature allowing it to whack the programmer on the back >> >> of the

Re: Assignment to volatile objects

2012-01-30 Thread Zoltán Kócsi
On Mon, 30 Jan 2012 19:51:47 -0600 Gabriel Dos Reis wrote: > On Mon, Jan 30, 2012 at 4:59 PM, Zoltán Kócsi wrote: > > David Brown wrote: > > > >> Until gcc gets a feature allowing it to whack the programmer on the back > >> of the head with Knuth's "The Art of Computer Programming" for writing

Re: Assignment to volatile objects

2012-01-30 Thread Zoltán Kócsi
On Tue, 31 Jan 2012 00:38:15 +0100 Georg-Johann Lay wrote: > A warning would be much of a help to write unambiguous, robust code. > So the question is rather why user refuses to write robust code in the > first place once there is a warning. The user (me, in this case) does not refuse writing r

Re: Assignment to volatile objects

2012-01-30 Thread Gabriel Dos Reis
On Mon, Jan 30, 2012 at 4:59 PM, Zoltán Kócsi wrote: > David Brown wrote: > >> Until gcc gets a feature allowing it to whack the programmer on the back >> of the head with Knuth's "The Art of Computer Programming" for writing >> such stupid code that relies on the behaviour of volatile "a = b = 0

Re: Assignment to volatile objects

2012-01-30 Thread Georg-Johann Lay
Zoltán Kócsi schrieb: paul_kon...@dell.com> wrote: I would prefer this to generate a warning. The C language standard change you refer to is a classic example of a misguided change, and any code whose behavior depends on this deserves a warning message, NOT an option to work one way or the oth

Re: Assignment to volatile objects

2012-01-30 Thread Zoltán Kócsi
paul_kon...@dell.com> wrote: > I would prefer this to generate a warning. The C language standard change > you refer to is a classic example of a misguided change, and any code whose > behavior depends on this deserves a warning message, NOT an option to work > one way or the other. Sure. Howeve

Re: Assignment to volatile objects

2012-01-30 Thread Zoltán Kócsi
David Brown wrote: > Until gcc gets a feature allowing it to whack the programmer on the back > of the head with Knuth's "The Art of Computer Programming" for writing > such stupid code that relies on the behaviour of volatile "a = b = 0;", > then a warning seems like a good idea. a = b = 0;

Re: Assignment to volatile objects

2012-01-30 Thread David Brown
On 30/01/12 23:22, paul_kon...@dell.com wrote: I would prefer this to generate a warning. The C language standard change you refer to is a classic example of a misguided change, and any code whose behavior depends on this deserves a warning message, NOT an option to work one way or the other.

RE: Assignment to volatile objects

2012-01-30 Thread Paul_Koning
I would prefer this to generate a warning. The C language standard change you refer to is a classic example of a misguided change, and any code whose behavior depends on this deserves a warning message, NOT an option to work one way or the other. paul -Original Message- From: