🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #164

Re: preprocessing subterfuge

#164
From: 12-Aug-1992 1513
Date: Wed, 12 Aug 1992 06:17
33 lines
1773 bytes
In article <1992Aug11.202135.28878@ugle.unit.no> toriver@flipper.pvv.unit.no (Tor Iver Wilhelmsen) writes:
>In article <1992Aug10.031337.4424@druid.uucp> darcy@druid.uucp (D'Arcy J.M. Cain) writes:
>>Gnu C with -Wall -ansi -pedantic has a pretty tight sphincter.

[Additional tightening recommended by other posters.]

>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

Yes, you get a correct diagnostic, and the implementation can then proceed
however it likes on your undefined program.

>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.

Yes, you get a correct diagnostic, and the implementation can then proceed
however it likes on your undefined program.

>which I would think would be right.

You can modify the source for GCC to change its warnings to errors and
terminate compilation.  This would not change its degree of conformance.
--
Norman Diamond       diamond@jit081.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
"Yeah -- bad wiring.  That was probably it.  Very bad."
Technical Details
Message-ID: <9208120617.AA23508@enet-gw.pa.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!ucbvax!jit081.enet.dec.com!diamond

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!ames!agate!ucbvax!jit081.enet.dec.com!diamond
From: diamond@jit081.enet.dec.com (12-Aug-1992 1513)
Newsgroups: comp.std.c
Subject: Re: preprocessing subterfuge
Message-ID: <9208120617.AA23508@enet-gw.pa.dec.com>
Date: 12 Aug 92 06:17:24 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 33