splintchecker/splint

Parse Error: Non-function declaration __BEGIN_DECLS : int.

Closed this issue · 2 comments

$ splint -I ./include test_data.c

Splint 3.1.2 --- 03 May 2009

/usr/include/error.h:31:7: Parse Error: Non-function declaration:
               __BEGIN_DECLS : int. (For help on parse errors, see splint -help
               parseerrors.)
*** Cannot continue.

Found this http://www.cs.virginia.edu/pipermail/splint-discuss/2003-October/000276.html that seems similar to this error.

Can you attach some minimal source that shows this error?

Sorry, I missed the 'error.h'. You need to have __BEGIN_DECLS declared as nothing for 'C' and splint. You have to look at error.h... there is an 'extern "C"' some how and splint doesn't parse C++.