Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] From function definition to function declaration and back



Hello,

On 19/01/2012 12:46, Damien Karkinsky wrote:
> I have a simple question. How do I get the function declaration knowing
> the Cil_types.varinfo of a function definition?
>

I'm not too sure of what you want. Do you need access to the 
corresponding GVarDecl (that may not exist), in which case nothing is 
done (but a small visitor applied to the current AST should do the 
trick), or to the underlying kernel_function, in which case 
Globals.Function.get is exactly what you need (and then you have access 
to the functions of Kernel_function to retrieve more specific information).

> Thank you
> Kind Regards
> Damien
>
> PS. I have also noticed a couple of places in the doc which confuse the
> terms function definition with function declaration.

Unfortunately, Cil_types.fundec is the type for function definitions. 
This does not really clarify the situation.

Best regards,
-- 
E tutto per oggi, a la prossima volta
Virgile