Anonymous Login Frama-C issues should now be submitted on Frama-C's GitLab
2021-03-06 02:49 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002161Frama-CKernelpublic2016-02-03 11:25
Assigned Toyakobowski 
Product VersionFrama-C Sodium 
Target VersionFixed in VersionFrama-C Magnesium 
Summary0002161: redefinition of __STDC_VERSION__
DescriptionI have installed Frama-C Sodium on xubuntu-15.10 (beta).

When I run Frama-C on a simple program then I receive the following warning:

$ frama-c foo.c
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing foo.c (with preprocessing)
/tmp/ppannotcb181c.c:1:0: warning: "__STDC_VERSION__" redefined
 #define __STDC_VERSION__ 201112L
<built-in>: note: this is the location of the previous definition
/tmp/ppannotcb181c.c:2:0: warning: "__STDC_UTF_16__" redefined
 #define __STDC_UTF_16__ 1
<built-in>: note: this is the location of the previous definition
/tmp/ppannotcb181c.c:3:0: warning: "__STDC_UTF_32__" redefined
 #define __STDC_UTF_32__ 1
<built-in>: note: this is the location of the previous definition
Steps To Reproducerun 'frama-c foo.c' on the attached file
Additional InformationThe problem does NOT occur under xubuntu-15.04
TagsNo tags attached.
Attached Files
  • c file icon foo.c (85 bytes) 2015-09-15 16:41 -
        assigns \nothing;
        ensures \result == 1;
    int foo()
        return 1;
    c file icon foo.c (85 bytes) 2015-09-15 16:41 +




yakobowski (manager)

This is due to GCC's shift from C99 to C11. Magnesium will handle this issue fine. Alternatively, it may help to add '-cpp-extra-args="-std=C99"' to your command-line. (Not sure this is actually sufficient, though.)


jens (reporter)

In one of my xubuntu-15.10 installations Magnesium still complains.
Even when I add '-cpp-extra-args="-std=c99"', then it prints

/tmp/ppannot16f3ff.c:1:0: warning: "__STDC_VERSION__" redefined
 #define __STDC_VERSION__ 199901L
<built-in>: note: this is the location of the previous definition


virgile (developer)

I'm not able to reproduce the issue here with a fresh Magnesium installation. Can you provide an example file, together with the output of frama-c -help and gcc -version?


jens (reporter)

I observed it yesterday. Afterwards I reinstalled a patched version of Magnesium to deal with 0002205 and then the issue disappeared. Somewhat weird. I think this issue can be closed again. Sorry.


virgile (developer)

No problem, this happens to everyone now and then.

-Issue History
Date Modified Username Field Change
2015-09-15 16:41 jens New Issue
2015-09-15 16:41 jens File Added: foo.c
2015-09-15 17:20 yakobowski Note Added: 0006038
2015-10-22 13:15 yakobowski Status new => resolved
2015-10-22 13:15 yakobowski Fixed in Version => Frama-C Magnesium
2015-10-22 13:15 yakobowski Resolution open => fixed
2015-10-22 13:15 yakobowski Assigned To => yakobowski
2016-01-26 08:43 signoles Status resolved => closed
2016-02-02 22:03 jens Note Added: 0006147
2016-02-02 22:03 jens Status closed => feedback
2016-02-02 22:03 jens Resolution fixed => reopened
2016-02-03 09:27 virgile Note Added: 0006148
2016-02-03 11:21 jens Note Added: 0006149
2016-02-03 11:21 jens Status feedback => assigned
2016-02-03 11:25 virgile Note Added: 0006150
2016-02-03 11:25 virgile Status assigned => closed
2016-02-03 11:25 virgile Resolution reopened => fixed
+Issue History