Article View: net.lang.c++
Article #169System V preprocessor problem with <generic.h>
From: Jonathan P. Leech
Date: Fri, 25 Apr 1986 04:56
Date: Fri, 25 Apr 1986 04:56
39 lines
1742 bytes
1742 bytes
Expires:
Sender:
Followup-To:
Organization : California Institute of Technology
Keywords:
The <generic.h> header file defines constructs of the form
#define name2(a,b) a\
b
#define name3(a,b,c) a\
b\
c
with the intent of producing
name2(a,b) => ab etc.
unfortunately the System V cpp (at least the HP and ELXSI
versions) instead produces
name2(a,b) => a b
this is a serious problem in every case I can find of these
constructs being used - specifically <vector.h>. I don't think
there's any way to produce this behavior with the System V cpp.
Combined with the problem of '//' comments not being elided by
cpp, I think C++ should come with its own preprocessor (or have it
integrated into cfront).
Additional amusement: try running cpp with input from your
keyboard and #include <generic.h>. Note that it now takes > 1 EOF to
get out of cpp!
--
Jon Leech (jon@csvax.caltech.edu || ...seismo!cit-vax!jon)
Caltech Computer Science Graphics Group
__@/
Technical Details
Message-ID:
<410@cit-vax.Caltech.Edu>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ll-xn!cit-vax!jonShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!ll-xn!cit-vax!jon From: jon@cit-vax.Caltech.Edu (Jonathan P. Leech) Newsgroups: net.lang.c++ Subject: System V preprocessor problem with <generic.h> Message-ID: <410@cit-vax.Caltech.Edu> Date: Fri, 25-Apr-86 00:56:35 EDT Article-I.D.: cit-vax.410 Posted: Fri Apr 25 00:56:35 1986 Date-Received: Sun, 27-Apr-86 07:24:22 EDT Reply-To: jon@cit-vax.UUCP (Jonathan P. Leech) Distribution: net Organization: California Institute of Technology Lines: 35 Summary: Ryserisms aren't in System V /lib/cpp