delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/03/17:46:08

From: psmith AT baynetworks DOT com (Paul D. Smith)
Newsgroups: comp.os.msdos.djgpp,gnu.gcc,gnu.gcc.help
Subject: Re: GCC vs. CC. problem with macro. Help required!
Date: 02 Jun 1999 13:27:01 -0400
Organization: Bay Networks, Inc. / Billerica, MA
Lines: 41
Message-ID: <p5u2sq5x96.fsf@baynetworks.com>
References: <3753FA47 DOT 81AD25F6 AT cs DOT joensuu DOT fi> <p5zp2j7ug1 DOT fsf AT baynetworks DOT com> <375561A2 DOT A24B712A AT cs DOT joensuu DOT fi>
NNTP-Posting-Host: lemming.engeast.baynetworks.com
X-Trace: spinner.corpeast.baynetworks.com 928344421 2552 192.32.138.39 (2 Jun 1999 17:27:01 GMT)
X-Complaints-To: usenet AT spinner DOT corpeast DOT baynetworks DOT com
NNTP-Posting-Date: 2 Jun 1999 17:27:01 GMT
X-Newsreader: Gnus v5.5/Emacs 20.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

[[ Please don't CC me via email without noting that fact in your
   message; it's annoying to reply by email, then have to repeat myself
   later via news... thx! ]]

%% Eugene Ageenko <ageson AT cs DOT joensuu DOT fi> writes:

  >> What is "cc"... that is, where did it come from?  You don't give any
  >> information about your system, what version of GCC you're using, etc.

  ea> DEC OSF/1 C compiler on Aplha DEC (about ten years old)

  ea> We have solved current problems by flushing all pre-processor
  ea> operators to the left side of the screen.

  ea> Does it really matters? And how is it defined in standard?

The standard states that any amount of whitespace can come between the
beginning of the line and the `#' character, and any number of spaces
and/or tabs can come between the `#' and the keyword; so, in standard C
this is perfectly legal:

        #                           define FOO                  bar

However, many older preprocessors don't like this.  Most preprocessors,
but not all, will allow you to put horizontal whitespace between the `#'
and the keyword:

#  define FOO bar

I use this form in GNU make, which is very portable even to pre-standard
compilers, and I've not received any bugs about it, FWIW.

Many pre-standard preprocessors won't allow you to indent the `#' out of
the first column, though.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith AT baynetworks DOT com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

- Raw text -


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