Skip to content

Incorrect pretty printing of cast

ID0001286: This issue was created automatically from Mantis Issue 1286. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001286 Frama-C Kernel public 2012-10-19 2012-10-19
Reporter signoles Assigned To virgile Resolution no change required
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Oxygen-20120901 Target Version - Fixed in Version -

Description :

=== test.i === char T; int G = 0; void f(int x); void main(void) { f((T + G) == 'b'); }

$ frama-c -print test.i /* Generated by Frama-C */ char T; int G = 0; extern void f(int x); void main(void) { f((int)(T + G) == 'b'); return; }

The casted expression is *(T+G) instead of ... == ... Note: the internal AST is correct, that is only the pretty printing which is incorrect.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information