tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Matti Saarinen <mjs () cc ! tut ! fi>
To: tru64-unix-managers
Subject: DTK C compiler (V6.3-126) with -E switch  produces incorrect output
Date: Thu, 14 Dec 2000 09:56:52 +0000	[thread overview]
Message-ID: <97678786210581.tru64-unix-managers.marc@archive.invalid> (raw)


Hello

I tested on 4.0G the Compaq C compiler included in latest DTK and
noticed that its -E switch does not work correctly. 

An example:

  % cat a.c
  #ifndef LIB_X11_LIB
  #define LIB_X11_LIB -lX11
  #endif

  configure___ LIBX=LIB_X11_LIB

  % cc -E a.c         
  # 1 "a.c"




  configure___ LIBX= - lX11 
                      /\
                      ||
        There is an extra white space before 'l'.

  % cc -nodtk -E a.c 
  # 1 "a.c"




  configure___ LIBX=-lX11


I read the documentation and I did not find any mentions about cc -E
being depreceated or the behaviour of the option being chaged.
Therefore I think this is a bug. 

Of course I can avoid the problem by using cpp or 'cc -E -nodtk' while
using preprocessor but that is not a good solution. For example the
configure scripts produced by GNU autoconf use 'cc -E' as preprocessor
by default.


-- 
- Matti -

                 reply	other threads:[~2000-12-14  9:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox