lint (of the SysV.3 sort)

Chris Davies chris at visionware.co.uk
Thu May 2 00:55:01 AEST 1991


While writing a makefile I came across the following problem with 'lint' on
SysV.3 UNIX (several different flavours of the same).

Consider a simple standalone program hello.c, anything reasonably correct will
do.

    $ cc -DFRED="oneword" -O -s c.c -o c
    $ lint -DFRED="oneword" c.c

OK so far. No problems (both commands work as expected).

Now try defining FRED as "two words", thus

    $ cc -DFRED="two words" -O -s c.c -o c
    $ lint -DFRED="two words" c.c

The compiler does its funky stuff quite happily, and the preprocessor defines
FRED as the constant "two words".

However there is no output from lint on the screen, and what's more, on closer
examination it's apparent that the file "words" (the second word of the
definition for FRED) contains the preprocessor output...

Why?

Chris
-- 
         VISIONWARE LTD, 57 Cardigan Lane, LEEDS LS4 2LE, England
    Tel +44 532 788858.  Fax +44 532 304676.  Email chris at visionware.co.uk
-------------- "VisionWare:   The home of DOS/UNIX/X integration" -------------



More information about the Comp.unix.programmer mailing list