Skip to content

Should warn for overlapping lv=lv; assignments

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


Id Project Category View Due Date Updated
ID0000945 Frama-C Plug-in > Eva public 2011-09-01 2017-12-17
Reporter pascal Assigned To maroneze Resolution open
Priority low Severity minor Reproducibility have not tried
Platform - OS - OS Version -
Product Version Frama-C Carbon-20110201 Target Version - Fixed in Version -

Description :

Frama-C should warn for this program:

struct S { int x; int y; };

struct T { int z; struct S s; };

union U { struct S f ; struct T g; } u;

main(){ u.f = u.g.s; return 0; }

6.5.16.1 3: If the value being stored in an object is read from another object that overlaps in any way the storage of the first object, then the overlap shall be exact and the two objects shall have qualified or unqualified versions of a compatible type; otherwise, the behavior is undefined.

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