This is the mail archive of the gcc@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]

Re: Assignment to volatile objects


David Brown <david.brown@hesbynett.no> 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; might be stupid. 

Is if ( ( a = expr ) ); is also stupid? 

I thought that that idiom was cited as an example for the expressiveness of C
in the C bible (the K&R book).

Zoltan


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