www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/21/16:03:18

Date: Tue, 21 Jun 94 15:27:36 EDT
From: jes AT mbio DOT med DOT upenn DOT edu (Joe Smith)
Posted-Date: Tue, 21 Jun 94 15:27:36 EDT
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: O_TEXT/O_BINARY grief

Allright, I wasn't going to get further involved in this, but...

Eric Backus <ericb AT lsid DOT hp DOT com> wrote:
> Yes, and ANSI C agrees.  Also, the ANSI C function isspace() returns
> true for those same six characters.

See, I only *thought* I was confused...

> But the C preprocessor must know about line end characters, so that it
> knows when macro definitions and ifdefs end, and so that it can remove
> backslash-newline combinations.

I forgot about the need to deal with the preprocessor.

OTOH, can anyone give me a for-instance where treating all six of the
above characters as 'whitespace' leads to incorrect semantics?  And I
don't think quoted strings that span source lines count, since there
are perfectly portable ways to do that without embedding control
characters in the source.  In the case mentioned (cpp macros), so you
remove backslash-linefeed pairs and leave the carriage-return: the
compiler will see the carriage-return as just another 'whitespace',
the same as the tab(s) you might add at the beginning of the following
line.

Is cpp *required* by the standard to remove backslash-linefeed pairs?
It might conceivably keep the newline as part of the macro body.  If
you write macros that *depend* on one behavior or another (say,
splitting and identifier or operator), then you will justly suffer for
it.

<Joe

 Joe Smith
 University of Pennsylvania                    jes AT mbio DOT med DOT upenn DOT edu
 Department of Physiology                      (215) 898-0485 - work
 Philadelphia, PA 19104-6059                   (609) 854-6428 - home

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019