🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1423

Re: warning: '/*' within comment

#1423
From: Lars Henrik Mathiesen
Date: Tue, 12 Jun 1990 22:27
20 lines
1356 bytes
diamond@tkou02.enet.dec.com (diamond@tkovoa) points out that I gave a
bad counterexample, so I'll try again.

If you know of an ANSI C compiler (I don't think it's ``perfectly
valid'' otherwise) which does not lex #if'fed-out blocks into
pptokens, please explain how it handles this conformant (I think)
program:
#include <stdio.h>
#if 0
I'll put a /* inside 's
#endif
#if 1
Now it's a */. This program doesn't use comments.
#else
int main(int c, char *v[]) { printf("Hello, world!\n"); return 0; }
#endif

--
Lars Mathiesen, DIKU, U of Copenhagen, Denmark      [uunet!]mcsun!diku!thorinn
Institute of Datalogy -- we're scientists, not engineers.      thorinn@diku.dk
Technical Details
Message-ID: <1990Jun12.222745.3015@diku.dk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uupsi!sunic!dkuug!freja.diku.dk!skinfaxe.diku.dk!thorinn
References: <1990Jun1.200433.6919@druid.uucp> <AaOZGd_00as98coVU9@andrew.cmu.edu> <16786@haddock.ima.isc.com> <371@necssd.NEC.COM> <1774@tkou02.enet.dec.com> <1990Jun8.224827.23783@diku.dk> <1777@tkou02.enet.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uupsi!sunic!dkuug!freja.diku.dk!skinfaxe.diku.dk!thorinn
From: thorinn@skinfaxe.diku.dk (Lars Henrik Mathiesen)
Newsgroups: comp.std.c
Subject: Re: warning: '/*' within comment
Message-ID: <1990Jun12.222745.3015@diku.dk>
Date: 12 Jun 90 22:27:45 GMT
References: <1990Jun1.200433.6919@druid.uucp> <AaOZGd_00as98coVU9@andrew.cmu.edu> <16786@haddock.ima.isc.com> <371@necssd.NEC.COM> <1774@tkou02.enet.dec.com> <1990Jun8.224827.23783@diku.dk> <1777@tkou02.enet.dec.com>
Sender: news@diku.dk (The Netnews System)
Organization: Department Of Computer Science, University Of Copenhagen
Lines: 20