Path: utzoo!attcan!uunet!mcvax!enea!dkuug!freja!njk From: njk@freja.diku.dk (Niels J|rgen Kruse) Newsgroups: comp.lang.c Subject: Compiler bug Message-ID: <4279@freja.diku.dk> Date: 14 Dec 88 21:29:09 GMT Organization: DIKU, U of Copenhagen, DK Lines: 31 Consider this little one liner: -------- foo.c -------- int foo = 1 && 0; ------ end foo.c ------ On a Bsd 4.3 VAX 785, cc complains : "foo.c", line 1: illegal initialization and likewise does lint : foo.c: foo.c(1): illegal initialization foo defined( foo.c(1) ), but never used On a Xenix286 intel sys310, cc compiles it nicely, but lint complains : foo.c ============== (1) warning: constant in conditional context (1) illegal initialization ============== name defined but never used foo foo.c(1) So 3 out of 4 get it wrong. This bug seems to bee contagious. ----- Niels J|rgen Kruse njk@freja.dk DIKU, Copenhagen, Denmark