Article View: gnu.gcc.bug
Article #5921Re: "ANSI C does not allow extra `;' outside of a function"
From: Alexandre Oliva
Date: Wed, 29 Jan 1997 00:00
Date: Wed, 29 Jan 1997 00:00
23 lines
1541 bytes
1541 bytes
Peter Seebach writes: > May I ask why GNU C *does* allow this, AFAICT, completely useless extension? > I'm all for functional extensions, but I'm not sure this one buys anyone > anything. This may be useful if you happen to #define some preprocessor-macros that provide declarations. It is useful to accept extra ';' so that you may include semicolons in the macro and the user won't get an error if he also adds one after the macro usage. > (I was poking about since I've discovered compilers which *do* accept this, > no matter what, and I was looking to see if gcc had fallen prey to the > apparent epidemic. Of course, it hadn't.) By the way, gcc won't accept this if you compile with flags: -ansi -pedantic-errors -- Alexandre Oliva mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org Universidade Estadual de Campinas, SP, Brasil
Technical Details
Message-ID:
<orhgk1ds8a.fsf@dcc.unicamp.br>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<9701281946.AA02267@moose.intran.xerox.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,a148e8bf1ea05dda X-Google-Attributes: gid113d02,public From: oliva@dcc.unicamp.br (Alexandre Oliva) Subject: Re: "ANSI C does not allow extra `;' outside of a function" Date: 1997/01/29 Message-ID: <orhgk1ds8a.fsf@dcc.unicamp.br> X-Deja-AN: 212977542 sender: bug-gcc-request@prep.ai.mit.edu references: <9701281946.AA02267@moose.intran.xerox.com> content-type: text/plain; charset=US-ASCII organization: IC - UNICAMP - Campinas, SP, Brazil x-gateway: relay3.UU.NET from bug-gcc to gnu.gcc.bug; Tue, 28 Jan 1997 23:26:02 EST mime-version: 1.0 (generated by tm-edit 7.101) newsgroups: gnu.gcc.bug