initializer completion
ID0000788: This issue was created automatically from Mantis Issue 788. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0000788 | Frama-C | Plug-in > wp | public | 2011-04-12 | 2014-02-12 |
Reporter | patrick | Assigned To | dargaye | Resolution | fixed |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Platform | - | OS | - | OS Version | - |
Product Version | Frama-C Carbon-20110201 | Target Version | - | Fixed in Version | Frama-C Nitrogen-20111001 |
Description :
C initialization of globals should be completed by 0. This is partially done by CIL, since int t15[15] = {3} ; int t20[20] = {3} ; is translated into int t15[15] = {3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int t20[20] = {3};
So, it can (maybe not for big arrays) be a bug of CIL. Otherwise, wp should virtually perform this completion. This is not done by wp 0.3 plug-in
Additional Information :
This ensures clause should be provable. int t15[15] = {3} ; int t20[20] = {3} ; //@ ensures t20[3]==0; int main (void) { }