home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!agate!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
- From: torek@horse.ee.lbl.gov (Chris Torek)
- Newsgroups: comp.lang.c
- Subject: string literal concatenation (was printf question)
- Date: 3 Sep 1992 16:01:27 GMT
- Organization: Lawrence Berkeley Laboratory, Berkeley
- Lines: 26
- Message-ID: <26043@dog.ee.lbl.gov>
- References: <kimcm.714943581@login.dkuug.dk> <1226@pascal.einstein.eds.com> <RICHARD.92Aug30153124@CLYDE.ttt.kth.se> <3361@dozo.and.nl> <1SEP199221241770@eql.caltech.edu> <MJN.92Sep3000652@pseudo.uucp>
- Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
- NNTP-Posting-Host: 128.3.112.15
-
- In article <1SEP199221241770@eql.caltech.edu> rankin@eql.caltech.edu
- (Pat Rankin) writes:
- >>Minor quibble: string concatentation is performed by the compiler,
- >>not the preprocessor. ...
-
- In article <MJN.92Sep3000652@pseudo.uucp> mjn@pseudo.uucp
- (Murray Nesbitt) contends:
- >Concatenation of character string literals is performed during the
- >preprocessing phase of translation.
-
- Both are technically wrong; someone else (I forget who) got it right.
- Just for the record, the ANSI C standard (X3.159-1989) does not divide
- the task of compilation into `preprocessing' and `compilation' phases
- as such. Rather, it lists *eight* separate phases. Phase 4 might be
- called the `preprocessing' phase, but the standard does not do so.
- Syntactic and semantic analysis, which might be called `compilation',
- is phase 7. String literal concatenation occurs in phase 6.
-
- Loosely speaking, then, concatenation occurs *between* preprocessing
- and compilation, not during either one.
-
- We now return you to your regular programming: megabytes of Unix- and
- MSDOS-specific news inappropriately directed to a generic C group. :-)
- --
- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
- Berkeley, CA Domain: torek@ee.lbl.gov
-