[splint-discuss] checking Oracle Pro*C files
Ludolf Holzheid
lholzheid at bihl-wiedemann.de
Mon Jan 22 10:30:59 PST 2007
On Mon, 2007-01-22 11:56:53 -0600, Phil Lawrence wrote:
> [..]
> I had the bright idea that I could just run my .pc files through the
> Oracle preprocessor and then splint the resulting .c file... That
> seemed to work (splint did start talking about my .c file), but then
> splint said it was back to checking the .pc file (see output copied
> below). Why?
Hello Phil,
I suppose your preprocessor includes "#line" directives to its output,
including the original file name. If this is the case, splint is able
to determine the original error locations and uses these for messages
instead of the line numbers in the generated .c file. (The compilers
do the same.)
I have no idea what's "Oracle Pro*C" about and how much work this
would be, but I suppose it was better to have a set of #defines (or -D
options to splint) and let split's preprocessor replace the "EXEC SQL
..." statements by some C compatible syntax. That way, splint was able
to distinguish between system and user headers, use prototypes for C
macros, and so on. Particularly, if your preprocessor removes the
comments, you lose the possibility for code annotations.
Ludolf
--
---------------------------------------------------------------
Ludolf Holzheid Tel: +49 621 339960
Bihl+Wiedemann GmbH Fax: +49 621 3392239
Floßwörthstraße 41 e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------
More information about the splint-discuss
mailing list