Pavel Roskin wrote:
I hate to say that, but a better alternative is to fix sparse to act
like the native compiler by default (possibly with options to imitate
other architectures or to be fully arch-neutral).
$(CC) $(CFLAGS) -E -dM -x c /dev/null -o builtin.h
... will output a file containing all the buildin macros that you can
feed to sparse with -include.
Replacing -x c with, say, -x c++ gives you the builtins for C++;
including $(CFLAGS) gives the appropriate set of macros for any
particular combination of options (which can affect the builtin macro set.)
-hpa