DTK C compiler (V6.3-126) with -E switch produces incorrect output

From: Matti Saarinen <mjs_at_cc.tut.fi>
Date: Thu, 14 Dec 2000 11:56:52 +0200

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 -
Received on Thu Dec 14 2000 - 09:58:00 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT