tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* DTK C compiler (V6.3-126) with -E switch  produces incorrect output
@ 2000-12-14  9:56 Matti Saarinen
  0 siblings, 0 replies; only message in thread
From: Matti Saarinen @ 2000-12-14  9:56 UTC (permalink / raw)
  To: tru64-unix-managers


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 -

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-14  9:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-14  9:56 DTK C compiler (V6.3-126) with -E switch produces incorrect output Matti Saarinen

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