Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!metro!dmssyd.syd.dms.CSIRO.AU!ditsydh.syd.dit.CSIRO.AU!evans From: evans@syd.dit.CSIRO.AU (Bruce.Evans) Newsgroups: comp.os.minix Subject: Re: bug in C68 Message-ID: <1991May17.144638.843@syd.dit.CSIRO.AU> Date: 17 May 91 14:46:38 GMT Article-I.D.: syd.1991May17.144638.843 References: <53799@nigel.ee.udel.edu> Organization: CSIRO Division of Info Tech, Sydney, Australia Lines: 20 In article <53799@nigel.ee.udel.edu> breure%ITIHP1.TNO.NL@pucc.princeton.edu (Frank Breure) writes: > >I discovered a bug in the parser of C68, in a function definition >you don't have to use comma's to separate the parameters, thus > main(argc argv) /* no comma between argc and argv !! */ > int argc; > char *argv[]; >is accepted! It's amusing that the released version of bcc has the same bug. This causes unamusing bugs in conjunction with another bug that allows type declarators in bad places. bcc does not support new-style function definitions, yet it accepts: int foo(int bug) { return bug; } The function is interpreted as having 2 parameters 'int' and 'bug'. 'bug' is given the wrong stack slot (and 'int = 1;' works inside the function :-(). -- Bruce Evans evans@syd.dit.csiro.au