Bill:

Thanks for the prompt reply.  I'm glad to get a clear answer on splint's 
capabilities.

I thought of copying each *.LIB file to a of the same name with a *.h 
extension, then substituting #include for each occurrence of #use in both the 
master C source file and in each new *.h file, at the same time including the 
equivalent *.h file instead of the old *.LIB file.  This would be workable 
if the number of *.LIB files were limited to source files in my project. 
Unfortunately, Dynamic C uses the *.LIB approach because it has no linker. 
The vast majority of nested *.LIB files comprise the various function libraries 
provided with the Dynamic C compiler. Each *.LIB file contains both 
the API information normally contained in a *.h file, and the source code for 
that library. To repeat the file copy and sed/awk/perl operation for the 
entire Dynamic C library suite would be a somewhat daunting undertaking.  I'm 
not sure I want to go that far to get the benefits that running Splint 
on my project would provide.  The idea of a virtual substitution being done 
within Splint as it ran was much more appealing, and would not have 
been intrusive on the Dynamic C function library. 

Thanks again for being so responsive.

Best regards, 

Tom Cox

-----Original Message-----
From: "Bill Pringlemeir" [spl...@sympatico.ca]
Date: 05/07/2011 01:16 PM
To: splint-discuss@mail.cs.virginia.edu
Subject: Re: [splint-discuss] Is it possible to substitute pre-compiler
        directives?

Note: Original message sent as attachment
--- Begin Message ---
On  7 May 2011, la...@excite.com wrote:

> My first thought was to insert "#define #use #include" in a Splint
> option file or the S_SPLINT_S section for Splint directives. That does
> not work.

> Is there a way to specify an option in Splint that would make this
> portion of Dynamic C more like ANSI C without ?

I don't think you will be able to do this with splint alone.  There are
two phases of splint processing.  One preprocess and the second parses
'c'.  There are somewhat intermixed.  It looks like you want to change
the grammar of the c pre-processor.

However, it should be fairly simple to run your source through
sed/awk/perl and do the transformation as you intended with the macro.
I think this is the best approach.

fwiw,
Bill Pringlemeir.

-- 
Yow!  Legally-imposed CULTURE-reduction is CABBAGE-BRAINED!
_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss


IDcgA

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

Reply via email to