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] Frama-C: #define not taken into account into annotations


  • Subject: [Frama-c-discuss] Frama-C: #define not taken into account into annotations
  • From: Dillon.Pariente at dassault-aviation.com (Pariente Dillon)
  • Date: Tue, 31 Mar 2009 10:36:26 +0200

Hello,
 
#define are not taken into account in annotations.
Of course *this is not a bug*: this is due to pre-processing of C
modules, before launching analysis.
 
But from a final user's point of view, when annotating source code, this
may be an issue, as one has to "navigate" among .h hierarchy to find the
actual definition of terms and replace it into annotations (this can
result into a loose of time when dealing with huge auto-generated C
modules embedding an important number of #define).
 
A simple example to illustrate the purpose:
 
//===== f.h
#define vx 0.0
 
//===== f.c file
#include "f.h"
float main(float v) { /*@ assert v<=vx ; */ return v; }
 
//===== stdout of frama-c f.c
[preprocessing] running gcc -C -E -I.   e1.c
File e1.c, line 6, characters 14-16:
Error during analysis of annotation: unbound logic variable vx
e1.c:6: Warning: ignoring logic code annotation
 
Is there any means to make such annotations compliant with #define?
 
Best regards,
Dillon PARIENTE
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20090331/1d572c28/attachment.htm