Frama-C Bug Tracking System - Frama-C
View Issue Details
0002117Frama-CKernelpublic2015-05-09 14:312016-01-26 08:52
edwin 
yakobowski 
normalminoralways
closedfixed 
Linux debian 3.16.0-4-amd64 #1 SDebian GNU/LinuxJessie
Frama-C Sodium 
Frama-C Magnesium 
0002117: frama-c gets confused by comma operator inside ternary operator: cannot cast from void to char
GCC and Clang correctly parse and compile the testcase below, however frama-c considers it invalid (cannot cast from void to char). In (char)(1?(((x)=6),1):0) AFAICT the type of (((x)=6),1) is integer, the void on the lhs of the comma operator should be ignored.
$ cat >x.c <
$ frama-c --version Version: Sodium-20150201 Compilation date: Thu May 7 22:46:49 EEST 2015 Share path: /home/edwin/.opam/system/share/frama-c (may be overridden with FRAMAC_SHARE variable) Library path: /home/edwin/.opam/system/lib/frama-c (may be overridden with FRAMAC_LIB variable) Plug-in paths: /home/edwin/.opam/system/lib/frama-c/plugins (may be overridden with FRAMAC_PLUGIN variable) $ ocaml -vnum 4.01.0 I originally encountered this problem when trying to parse sqlite3 with frama-c, see the getVarint32 macro. http://www.sqlite.org/cgi/src/artifact/20d9c59fd8277450
No tags attached.
related to 0001503closed virgile failure: invalid implicit conversion from void to int 
related to 0002131closed yakobowski Error with casted ternary statements 
Issue History
2015-05-09 14:31edwinNew Issue
2015-05-10 22:55yakobowskiRelationship addedrelated to 0001503
2015-05-12 21:51yakobowskiAssigned To => yakobowski
2015-05-12 21:51yakobowskiStatusnew => assigned
2015-05-29 10:20yakobowskiNote Added: 0005925
2015-05-29 10:20yakobowskiStatusassigned => resolved
2015-05-29 10:20yakobowskiResolutionopen => fixed
2015-06-05 16:15yakobowskiRelationship addedrelated to 0002131
2016-01-26 08:51signolesFixed in Version => Frama-C Magnesium
2016-01-26 08:52signolesStatusresolved => closed

Notes
(0005925)
yakobowski   
2015-05-29 10:20   
Fix committed to master branch.