> So the correct instructions (until I find a way to distribute a
> tarball) are:
>  git clone git://repo.or.cz/splint-patched.git
>  cd splint-patched
>  autoreconf -i
>  ./configure

Did all that.  Then

% make
make  all-recursive
Making all in src
  YACC     cgrammar.c
/home/cshome/o/ok/Downloads/splint.d/splint-patched/src/cgrammar.y:78.9-18: 
syntax error, unexpected identifier, expecting string
make[2]: *** [cgrammar.c] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

That refers to this line:

%define api.prefix {c_}

m% which bison
/usr/bin/bison
m% bison --version
bison (GNU Bison) 2.3
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2006 Free Software Foundation, Inc.

That is the version that is shipped with MacOSX 10.11.


I didn't have this problem installing earlier versions of
SPlint on earlier versions of OSX.

[Delay of a couple of hours while I download, and install
a local copy of, bison 3.0.4.]

OK, that seems to fix the Bison issue.

clang is not entirely happy with the source code:

  CC       message.o
message.c:67:32: warning: passing 'const char **' to parameter of type 'char **'
      discards qualifiers in nested pointer types
      [-Wincompatible-pointer-types-discards-qualifiers]
      modcode = reader_getInt (s);
                               ^
./Headers/reader.h:13:34: note: passing argument to parameter 'p_s' here
extern int reader_getInt (char **p_s) /*@modifies *p_s@*/ ;
                                 ^
1 warning generated.

Now for % make check

Checking ullint...
Checking utypes...
6,9c6,10
< utypes.c: (in function f)
< utypes.c:26:8: Variable src_bytes declared but not used
< 
< Finished checking --- 2 code warnings, as expected
---
> /usr/include/sys/_types.h:55:36: Parse Error:
>     Suspect missing struct or union keyword: __int64_t :
>     unsigned long int. (For help on parse errors, see splint -help
>     parseerrors.)
> *** Cannot continue.
*** FAIL ***

This is complaining about the line

typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */

OSX header files very often use __[u]int{8,16,32,64}_t .

The really puzzling thing is that
  _types.h does #include <machine/_types.h>
  which does #include "i386/types.h"
  which does typedef long long __int64_t;
*before* this line.  I don't know why it's not picking up
this definition.




_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss

Reply via email to