Frama-C Bug Tracking System - Frama-C
View Issue Details
0002161Frama-CKernelpublic2015-09-15 16:412016-02-03 11:25
jens 
yakobowski 
normalminoralways
closedfixed 
Frama-C Sodium 
Frama-C Magnesium 
0002161: redefinition of __STDC_VERSION__
I 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 ^ : note: this is the location of the previous definition /tmp/ppannotcb181c.c:2:0: warning: "__STDC_UTF_16__" redefined #define __STDC_UTF_16__ 1 ^ : note: this is the location of the previous definition /tmp/ppannotcb181c.c:3:0: warning: "__STDC_UTF_32__" redefined #define __STDC_UTF_32__ 1 ^ : note: this is the location of the previous definition
run 'frama-c foo.c' on the attached file
The problem does NOT occur under xubuntu-15.04
No tags attached.
c foo.c (85) 2015-09-15 16:41
https://bts.frama-c.com/file_download.php?file_id=1063&type=bug
Issue History
2015-09-15 16:41jensNew Issue
2015-09-15 16:41jensFile Added: foo.c
2015-09-15 17:20yakobowskiNote Added: 0006038
2015-10-22 13:15yakobowskiStatusnew => resolved
2015-10-22 13:15yakobowskiFixed in Version => Frama-C Magnesium
2015-10-22 13:15yakobowskiResolutionopen => fixed
2015-10-22 13:15yakobowskiAssigned To => yakobowski
2016-01-26 08:43signolesStatusresolved => closed
2016-02-02 22:03jensNote Added: 0006147
2016-02-02 22:03jensStatusclosed => feedback
2016-02-02 22:03jensResolutionfixed => reopened
2016-02-03 09:27virgileNote Added: 0006148
2016-02-03 11:21jensNote Added: 0006149
2016-02-03 11:21jensStatusfeedback => assigned
2016-02-03 11:25virgileNote Added: 0006150
2016-02-03 11:25virgileStatusassigned => closed
2016-02-03 11:25virgileResolutionreopened => fixed

Notes
(0006038)
yakobowski   
2015-09-15 17:20   
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.)
(0006147)
jens   
2016-02-02 22:03   
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 ^ : note: this is the location of the previous definition
(0006148)
virgile   
2016-02-03 09:27   
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?
(0006149)
jens   
2016-02-03 11:21   
I observed it yesterday. Afterwards I reinstalled a patched version of Magnesium to deal with #2205 and then the issue disappeared. Somewhat weird. I think this issue can be closed again. Sorry.
(0006150)
virgile   
2016-02-03 11:25   
No problem, this happens to everyone now and then.