In article <[EMAIL PROTECTED]> of Mon, 18 Mar 2002 
15:31:21 in , Gerrit P. Haase <[EMAIL PROTECTED]> writes
>I want to build splint on Cygwin, would be nice to have here;)
>I'm getting this error during compiletime:
>make[3]: Entering directory `/splint-'
>grep "FLG_" flags.def > Headers/flag_codes.gen
>Compiling cgrammar.c...
>Compiling cscanner.c...
Did you cut lines here?

Did you cut lines here?
>cgrammar.c: In function `yyparse':
>cgrammar.c:3538: `FLG_TRYTORECOVER' undeclared (first use in this function)
>cgrammar.c:3538: (Each undeclared identifier is reported only once
>cgrammar.c:3538: for each function it appears in.)
I shall try and help as you waited overnight for a response. As I am new 
to splint, please bear with any mistake I make.
At line 1076 in my AIX Makefile and at the same place in the full 
windows archive, there is a rule which starts "@" to silence it. I 
suggest you make it noisy.

I did so and remade cgrammar.o

08:19:28 05 url/http/
   : make cgrammar.o
echo "Compiling "cgrammar.c"..."; \
source='cgrammar.c' object='cgrammar.o' libtool=no \
depfile='.deps/cgrammar.Po' tmpdepfile='.deps/cgrammar.TPo' \
depmode=aix ../config/depcomp \
c89 -D_ALL_SOURCE -DHAVE_CONFIG_H -I. -I. -I..  -IHeaders   -g  -qmaxmem=32768 qhalt=w 
-qflag=i:i -qsrcmsg -qdbxextra -qinitauto=cf -qro -
qroconst -qsource -qshowinc -c `test -f cgrammar.c || echo './'`cgrammar.c
Compiling cgrammar.c...
08:19:47 05 url/http/

The critical thing in that VERY long line is -IHeaders.
../config/depcomp is a script which - among other things - runs that
long line.

The grep line you show should have transferred FLG_TRYTORECOVER
to Headers/flag_codes.gen

   : sed '/FLG_TRYTORECOVER/!d;=' flags.def Headers/flag_codes.gen
08:28:44 05 url/http/

The compilation should have picked up FLG_TRYTORECOVER. There follows a
trimmed .LST file which attempts to show that FLG_TRYTORECOVER at
Headers/flag_codes.h(378) is part of an anontmous enum whose definition
starts at Headers/flag_codes.h(49) which is included from
Headers/basic.h(33) which is included from cgrammar.c(280).

C for AIX Compiler Version --- cgrammar.c 03/19/02 08:19:43 (C)

 >>>>> SOURCE SECTION <<<<<

         1 | /*
       280 | # include "basic.h"
   2     1 | /*
   2    33 | # include "flag_codes.h"
  49     1 | /*
  49    17 | typedef enum
  49    18 | {
  49    19 |   SKIP_FLAG = -2,
  49    20 |   INVALID_FLAG = -1,
  49    21 | # include "flag_codes.gen"
  50     1 |     FLG_NULL,
  50   378 |     FLG_TRYTORECOVER,

I hope that this description will allow you to diagnose your problem.

My sed example above shows a spurious line number for the occurrence of
FLG_TRYTORECOVER in Headers/flag_codes.h.
Walter Briscoe

Reply via email to