While working with Frama-Clang, I ran into a problem. The following code shows the problem broken down to the minimum:
const long long value = -1;
int main(){
return 0;
}
Running the Frama-C (Frama-Clang) analysis leads to the following output.
> frama-c invalid_integer.cpp
[kernel] Parsing invalid_integer.cpp (external front-end)
Now output intermediate result
[kernel] invalid_integer.cpp:3: Failure: Invalid integer constant: -1
[kernel] User Error: stopping on file "invalid_integer.cpp" that has errors.
[kernel] Frama-C aborted: invalid user input.
There are several ways to work around this error.
- works if value is type short or int, fails for long and long long
- works without the const keyword
- works if the variable value is defined inside the main function instead of global definition
Where could this error come from and can it be solved?