https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119324

--- Comment #6 from Robert Dubner <rdubner at gcc dot gnu.org> ---
I compiled and installed cppcheck 2.17, which was a bit of an intelligence
test.  The error messages were very chatty, but didn't actually tell me what I
needed to know.  It took a while, but the internet came through.

So I have a working installation of cppcheck 2.17

Here is simple attempt:

bob@doobie:~/repos/gcc-cobol/gcc/cobol$ cppcheck genapi.cc
Checking genapi.cc ...
genutil.h:104:1: error: There is an unknown macro here somewhere. Configuration
is required. If FIXED_WIDE_INT is a macro then please configure it.
[unknownMacro]
FIXED_WIDE_INT(128) get_power_of_ten(int n);
^
Checking genapi.cc: INCORPORATE_ANALYZER...
Checking genapi.cc: LINE_TICK...
Checking genapi.cc: YDFLTYPE;YDFLTYPE_IS_DECLARED...
Checking genapi.cc: YYLTYPE;YYLTYPE_IS_DECLARED...
Checking genapi.cc: _CBLDIAG_H...
Checking genapi.cc: _SYMBOLS_H_...
Checking genapi.cc: condition_lists...
Checking genapi.cc: yy_flex_debug...

Since there are a bunch of .h file in gcc/, I tried this:

bob@doobie:~/repos/gcc-cobol/gcc/cobol$ cppcheck genapi.cc --force -I..
Checking genapi.cc ...
../hwint.h:62:5: error: #error "Unable to find a suitable type for
HOST_WIDE_INT" [preprocessorErrorDirective]
   #error "Unable to find a suitable type for HOST_WIDE_INT"
    ^

I don't know what I am doing differently, or why I am seeing errors that you're
not.

Reply via email to