From: utzoo!decvax!harpo!eagle!mhtsa!alice!rabbit!smb Newsgroups: net.lang.c,net.unix-wizards Title: C oddity -- language and/or compiler Article-I.D.: rabbit.1067 Posted: Wed Jan 19 10:05:38 1983 Received: Fri Jan 21 05:18:48 1983 A co-worker found this one the hard way.... double a; /* Note the semi-colon! */ b, c, d; main() { a = b; } On the VAX, this program was silently accepted, and b, c, and d were assigned 4 bytes apiece. On an 11, using the Ritchie C compiler, *nothing* was generated for b, c, and d; pcc, however, behaved the same way it did on the VAX. Presumably, we have some sort of bug here, since two different C compilers are doing very different things. My take is that both are wrong; that that construction should be flagged as a syntax error. But I'm willing to be convinced that we've stumbled across another strange and wondrous property of the comma operator. Enlightenment, anybody? --Steve Bellovin {rabbit,mhb5b,mhb5c}!smb