Frama-C Bug Tracking System - Frama-C
View Issue Details
0002090Frama-CKernelpublic2015-03-19 10:482016-01-26 08:52
virgile 
yakobowski 
normalminoralways
closedfixed 
Frama-C GIT, precise the release id 
Frama-C Magnesium 
0002090: unary negation of enum constant always yield 0
The following code (note that g is only here to retain the enum definition itself in the generated AST). enum Foo { E1, E2, E3 }; int f() { return !E1; } int g() { return E1; } is translated by Frama-C as enum Foo { E1 = 0, E2 = 1, E3 = 2 }; int f(void) { int __retres; __retres = 0; return __retres; } int g(void) { int __retres; __retres = E1; return __retres; } f should in fact return 1, as E1 is bound to 0
No tags attached.
Issue History
2015-03-19 10:48virgileNew Issue
2015-03-19 10:48virgileStatusnew => assigned
2015-03-19 10:48virgileAssigned To => virgile
2015-03-19 11:02yakobowskiAssigned Tovirgile =>
2015-03-19 11:02yakobowskiAssigned To => yakobowski
2015-03-19 11:02yakobowskiStatusassigned => new
2015-03-20 19:13yakobowskiNote Added: 0005809
2015-03-20 19:13yakobowskiStatusnew => resolved
2015-03-20 19:13yakobowskiResolutionopen => fixed
2016-01-26 08:51signolesFixed in Version => Frama-C Magnesium
2016-01-26 08:52signolesStatusresolved => closed

Notes
(0005809)
yakobowski   
2015-03-20 19:13   
Fix committed to master branch.