mod.std.c Digest V6#3
Orlando Sotomayor-Diaz
osd at hou2d.UUCP
Tue May 7 11:44:48 AEST 1985
From: Orlando Sotomayor-Diaz (The Moderator) <cbosgd!std-c>
mod.std.c Digest Mon, 6 May 85 Volume 6 : Issue 3
Today's Topics:
why not #endif blah? (3 msgs)
----------------------------------------------------------------------
Date: Sat, 4 May 85 18:06 EDT
From: Mark Purtill <ucbvax!Purtill at MIT-MULTICS.ARPA>
Subject: why not #endif blah?
To: cbosgd!std-c at BERKELEY
No one is asking to be allowed to put "arbitrary garbage" after #endif;
they want to be able to put exactly what was in the corresponing #if or
#ifdef, i.e.,
#ifdef UNIX
...
#endif UNIX
Presumably, you didn't say
#if if test
...
#else if test
...
So that's where you get your error message. (Anyway, why #elif anyway?
That's very ugly. How about #elseif or even #else if??) If you really
can't stand to allow it in the standard, at least allow a compiler
-option to not barf when junk is after #endif et. al.
Mark
^.-.^ Purtill at MIT-MULTICS.ARPA **Insert favorite disclaimer here**
((")) 2-032 MIT Cambrige MA 02139
------------------------------
Date: 6 May 85 11:39:31 CDT (Mon)
From: plus5!hokey (Hokey)
Subject: why not #endif blah?
To: std-c at cbosgd
In article <920 at homxa.UUCP> sfbc!lr (Larry Rosler) writes:
>
>Seriously, the Committee did not feel that the existence of programs
>that misguidedly used an undocumented syntactic loophole in an
>undocumented preprocessor justified legitimizing the practice. As
>always, if enough members can be persuaded the other way, this decision
>can be reversed.
This software written by this misguided programmer in this very style
compiles and runs with no problems on 27 machines running under Xenix,
V7, {2,4}BSD, SysIII, and several releases of SysV, and compiles without
problems under OS/9 68000 and CRDS UNOS (using Unix tools).
How do we persuade members of the Committee to change their minds?
(Dare I mention the union initialization issue as well?)
This gets back to the issue of creating an official link between this
newsgroup and the Committee -- how can this be done as well?
Hokey ..ihnp4!plus5!hokey
314-725-9492
------------------------------
Date: Fri, 3 May 85 12:30:26 edt
From: decvax!ittvax!bunker!afs
Subject: why not '#endif blah'
To: ittvax!decvax!cbosgd!std-c
My objection to '#endif blah' with 'blah' thrown away is that it is
misleading. For example
#ifdef blah
#ifdef foo
...
#endif blah
There would be a tendency to assume that 'endif blah' ends the blah
case, whether or not it really does. Although any tokens following a #endif
would be effectively comments, they would not LOOK like comments. I object
to adding anything to the language that is prone to misinterpretation,
especially if it is already covered (we have comments).
Andrew Seirup - Bunker Ramo, Trumbull CT - (203)386-2086
uucp address: {decvax|ittvax|duke|watmath}!bunker!afs
------------------------------
End of mod.std.c Digest - Mon, 6 May 85 21:11:38 EDT
******************************
USENET -> posting only through cbosgd!std-c.
ARPA -> ... through cbosgd!std-c at BERKELEY.ARPA (NOT to INFO-C)
In all cases, you may also reply to the author(s) above.
--
Orlando Sotomayor-Diaz /AT&T Bell Laboratories, Red Hill Road
/Middletown, New Jersey, 07748 (HR 1B 316)
Tel: 201-949-9230 /UUCP: {{{ucbvax,decvax}!}{ihnp4,harpo}!}hou2d!osd
More information about the Mod.std.c
mailing list