LCLint Trigraph problem

2001-10-04 Thread Anthony Giorgio

I've been using lclint some more, and I managed to work around the header 
problem I discussed earlier on the mailing list.  I made a local copy of 
the offending headers and did a substitution on them to remove the 
extraneous spaces.  LCLint is now satisified with regards to the previous 
problem, but it seems to not like trigraphs at all.  It was stumbling over 
them in some other local header files, and I made a small test program to 
verify the problem.

Here's the program, compile output, and lclint output:

ANGIO@AQMVSOE ~ cat foo.c
#include stdio.h
??=include math.h

int main(void)
{
return 0;
}
ANGIO@AQMVSOE ~ make foo
c89 -g -Wc,xplink -c foo.c
c89 -Wl,edit=no,xplink -o foo foo.o
rm -f foo.o
ANGIO@AQMVSOE ~ lclint foo.c
LCLint 3.0.0.17 --- 25 September 2001

foo.c:2:2: Parse Error. (For help on parse errors, see lclint -help
   parseerrors.)
*** Cannot continue.
ANGIO@AQMVSOE ~
  

It seems that lclint doesn't like the trigraph ??= which should be 
mapped to the character #.   Any idea why this is, and is it a bug in 
lclint?  I've been commenting around the offending header blocks with 
#ifndef __LCLINT__ , but I think this may be a larger problem than I first 
realized.

Thanks for all the help so far.


Anthony Giorgio
DBX Developer
Phone: (845) 435-9115
Tie Line: 295-9115
Email: agiorgio AT us.ibm.com

Thou shalt not follow the Null Pointer, for at its end Chaos and Madness 
lie.



LCLint 3.0.0.17 parse problem

2001-09-28 Thread Anthony Giorgio

I'm using LCLint 3.0.0.17 on an IBM zSeries mainframe, and I'm having 
problems getting it to parse the code for the project I'm on.  Whenever it 
tries to parse one of the systerm header files, it gags on the 
preprocessor step.  Many of the header files have a construct similar to 
the one below:

  #if (lots_of_stuff) \
  (other_stuff)
#define some_flag
  #endif 


Whenever I run lclint on a file that includes a header with the above 
construct, it dies with the following errror:

/usr/include/features.h:203:67: Invalid character in #if: \   

Is it valid to allow #if directives to span lines with the use of '\' , 
and if so, how can I convince lclint that it's okay?  If it's not valid, 
then how can I have lclint ignore the problem?  I can't change the system 
header files to make them more compliant, even though it might be a good 
idea :)


Anthony Giorgio
DBX Developer
Phone: (845) 435-9115
Tie Line: 295-9115
Email: agiorgio AT us.ibm.com