Article View: gnu.gcc.help
Article #53403Preprocessor questions: quotes and slashes
From: Dennis Jespersen
Date: Thu, 16 Jan 1992 12:28
Date: Thu, 16 Jan 1992 12:28
26 lines
1683 bytes
1683 bytes
I have a quick question on the "proper" treatment of single quotes and
slashes. Consider the following 2-line file:
c let's check this
& 'and this'////)
When I run it through /lib/cpp on my machine (a NeXT running 2.1 and
GNU CPP version 1.36) I get the output (indented for clarity)
testcpp.tmp:1: unterminated string or character constant
# 1 "testcpp.tmp"
c let's check this
& 'and this'
Is the complaint about line 1 correct? The complaint goes away if I
use the -traditional switch to /lib/cpp. And how about the second
line? Why are all the slashes and the parenthesis removed? I've
tried this on several other machines (Sun, Iris, VAX/ULTRIX) and never
had this result. I've looked at the GNU docs and haven't been able to
find anything explaining this behavior.
--
Dennis Jespersen
MS 202A-1
NASA Ames Research Center
Moffett Field, CA 94035-1000
Voice: (415) 604-6742
FAX: (415) 604-1095
email: jesperse@rft28.nas.nasa.gov
We have met the enemy and he is us. -- Pogo
Technical Details
Message-ID:
<JESPERSE.92Jan16062816@rft28.nas.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!eos!data.nas.nasa.gov!data!jesperseShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,fa187774b4ad0fad,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-01-16 14:42:49 PST Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!eos!data.nas.nasa.gov!data!jesperse From: jesperse@nas.nasa.gov (Dennis Jespersen) Newsgroups: gnu.gcc.help Subject: Preprocessor questions: quotes and slashes Message-ID: <JESPERSE.92Jan16062816@rft28.nas.nasa.gov> Date: 16 Jan 92 12:28:16 GMT Sender: news@nas.nasa.gov Distribution: gnu Organization: Computational Fluid Dynamics Branch, NASA Ames Research Center Lines: 26