Skip to content

failure: invalid implicit conversion from void to int

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


Id Project Category View Due Date Updated
ID0001503 Frama-C Kernel public 2013-10-18 2015-05-10
Reporter pascal Assigned To virgile Resolution fixed
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C GIT, precise the release id Target Version - Fixed in Version Frama-C Neon-20140301

Description :

The program below appears to conform to the C99 standard:

$ cat r.c void f() { 0 ? 0 * 0 ? 0 : 0 : 0; } $ gcc -c -std=c99 -pedantic r.c

But the Frama-C front-end refuses to parse it:

$ frama-c r.c [kernel] preprocessing with "gcc -C -E -I. r.c" r.c:3:[kernel] failure: invalid implicit conversion from void to int [kernel] user error: skipping file "r.c" that has errors. [kernel] Frama-C aborted: invalid user input.

Additional Information :

This may be the first of a non-singleton series of programs misdiagnosed with the "invalid conversion from void to int" diagnostic. The original error is in the Linux kernel. It seems better to submit only reduced programs even if the real problem is still there after the first fix, than to submit the entire code.

The entire file causing the problem is attached to this issue, but I can do reduction again after the 0 ? 0 * 0 ? 0 : 0 : 0; problem is fixed.

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