Article View: comp.std.c
Article #149Re: preprocessing subterfuge
From: Tor Iver Wilhelmsen
Date: Tue, 11 Aug 1992 20:21
Date: Tue, 11 Aug 1992 20:21
30 lines
1622 bytes
1622 bytes
In article <1992Aug10.031337.4424@druid.uucp> darcy@druid.uucp (D'Arcy J.M. Cain) writes: >enag@ifi.uio.no (Erik Naggum) writes: >>Sigh. Where can I get a compiler which rejects non-conforming code? >>Call it an educational tool more than a production tool, if you like. > >Gnu C with -Wall -ansi -pedantic has a pretty tight sphincter. > >-- May be, but it still insists on assigining a size of 1 (one) to the type void, which according to the parts of the standards I have seen, is an incomplete type. Thus you get a warning: void.c:3: warning: sizeof applied to a void type but in the resulting output of the sample program, it writes: Size of void = 1 c89 under ULTRIX, however, says (same program): void.c:3: error: In this statement, "void" is an incomplete type, and so has no size. Compilation terminated with errors. which I would think would be right. - Tor Wilhelmsen -- "I'm a Derek, and Dereks don't run!" - Derek in 'Bad Taste' toriver@pvv.unit.no Standard disclaimer should apply to this, I guess... "Reality is a poor escapism for people who cannot handle roleplaying" - Me
Technical Details
Message-ID:
<1992Aug11.202135.28878@ugle.unit.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ugle.unit.no!flipper.pvv.unit.no!toriverReferences:
<1992Aug9.144525.4521@taumet.com> <23277A@erik.naggum.no> <1992Aug10.031337.4424@druid.uucp>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ugle.unit.no!flipper.pvv.unit.no!toriver From: toriver@flipper.pvv.unit.no (Tor Iver Wilhelmsen) Subject: Re: preprocessing subterfuge Message-ID: <1992Aug11.202135.28878@ugle.unit.no> Sender: news@ugle.unit.no (NetNews Administrator) Organization: ProgramVareVerkstedet - UNIT References: <1992Aug9.144525.4521@taumet.com> <23277A@erik.naggum.no> <1992Aug10.031337.4424@druid.uucp> Date: Tue, 11 Aug 92 20:21:35 GMT Lines: 30