Skip to content

Alt-Ergo reports about " bool and int cannot be unified"

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


Id Project Category View Due Date Updated
ID0002355 Frama-C Plug-in > clang public 2018-02-05 2018-02-05
Reporter jens Assigned To virgile Resolution open
Priority normal Severity minor Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C 16-Sulfur Target Version - Fixed in Version -

Description :

If the attached simple C++ file is processed with the command line

frama-c  -wp -wp-rte  -warn-unsigned-downcast   -wp-out equal.wp++  equal.cpp

then the following error message occurs:

[wp] [Alt-Ergo] Goal typed__Z5equali_assert_rte_unsigned_downcast : Failed characters 4-22:typing error: bool and int cannot be unified

Could it be that Frama-Clang (or WP?) treats the return value of operator == as int instead of bool?

Additional Information :

The error message disappears when the option "-warn-unsigned-downcast" is omitted.

Attachments

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