"proper" output from cpp?
Paul Biron
pbiron at weber.ucsd.edu
Mon Sep 17 11:52:13 AEST 1990
In article <2936 at network.ucsd.edu> pbiron at weber.ucsd.edu (Paul Biron) writes:
>Can someone tell me whether this is "proper" output from cpp:
>
> % cat << EOF | /lib/cpp
> #define ABC abc
> #define XYZ xyz
> ABC.XYZ
> EOF
>
> # 1 ""
>
>
> abc .xyz
>
>Note the extra space AFTER abc and before the '.'
I have been informed that the ANSI standard specifies that a space
SHOULD be placed around macro expansions. And since gcc (and
cc on the NeXT) are ANSI compliant that this is "proper" output.
I also tried this using the -Aa ANSI switch in cc for HP-UX 7.0
and it inserts the space as well. The other systems I mentioned
in my original posting (SunOS 4.0 and 4.3 BSD on a Vax were NOT
ANSI compliant); and hence my confusion.
Thanx,
Paul Biron pbiron at ucsd.edu (619) 534-5758
Central University Library, Mail Code C-075-R
Social Sciences DataBase Project
University of California, San Diego, La Jolla, Ca. 92093
More information about the Comp.lang.c
mailing list