int -> integer -> real
ID0000117:
**This issue was created automatically from Mantis Issue 117. Further discussion may take place here.**
---
| **Id** | **Project** | **Category** | **View** | **Due Date** | **Updated** |
| --- | --- | --- | --- | --- | --- |
| ID0000117 | Frama-C | Kernel | public | 2009-06-05 | 2009-06-23 |
| | | | | | |
| --- | --- | --- | --- | --- | --- |
| **Reporter** | sboldo | **Assigned To** | virgile | **Resolution** | fixed |
| **Priority** | normal | **Severity** | major | **Reproducibility** | always |
| **Platform** | - | **OS** | - | **OS Version** | - |
| **Product Version** | Frama-C GIT, precise the release id | **Target Version** | - | **Fixed in Version** | Frama-C Beryllium-20090601-beta1 |
### Description :
From ACSL, I assume that
"C integral types char , short , int and long , signed or unsigned, are all subtypes of type integer ;
integer is itself a subtype of type real ;"
Therefore int is a subtype of real. But it does not work in practice:
int i;
/*@ loop invariant C== \pow(2., i) */
\pow takes 2 real numbers.
This annotation is refused by the message:
Error during analysis of annotation: invalid implicit conversion from int to real
issue