This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is there a way to restrict function calls (at compile time)?


On Wed, 2005-10-26 at 10:38 +0200, Kai Henningsen wrote:
> nathan@codesourcery.com (Nathan Sidwell)  wrote on 24.10.05 in <435CA8DD.20902@codesourcery.com>:
> 
> > Lars Luthman wrote:
> > > Is there a way, using GCC, to add 'properties' or 'flags' to C and C++
> > > functions and generate warnings or error messages when a function with a
> > > certain property (for example 'realtime safe') tries to call a function
> > > that does not have that property?
> >
> > GCC does not have such a feature.
> 
> Hmm. Can "sparse" do that? I know it can follow data structures in  
> different memory spaces ...
> 
> (That's the tool Linus wrote to check Linux kernel sources.)

sparse looks very interesting, especially the context checking.
Unfortunately it seems to be for C only and I need something that works
for C++ as well.

-- 
Lars Luthman
PGP key:     http://www.d.kth.se/~d00-llu/pgp_key.php
Fingerprint: FCA7 C790 19B9 322D EB7A  E1B3 4371 4650 04C7 7E2E

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]