--- layout: fc_discuss_archives title: Message 21 from Frama-C-discuss on December 2013 ---
Hi, This is because you are casting a constant int into a pointer, which makes a valid physical address. However, you can not do pointer arithmetics on such values, say, you **can not prove** that (int *) 0x100 shifted by one (on 64-bit machine) leads to (int *) 0x108. By the way, I'm surprise by the output of WP you report here. Which version are you using ? I suggest you to move to Fluorine, where the memory model of wp offers more options on pointers and casts. Regards. ________________________________ De : frama-c-discuss-bounces at lists.gforge.inria.fr [frama-c-discuss-bounces at lists.gforge.inria.fr] de la part de Xiao-lei Cui [x_cui at hotmail.com] Date d'envoi : lundi 9 d?cembre 2013 07:02 ? : frama-c-discuss at lists.gforge.inria.fr Objet : [Frama-c-discuss] [wp] type conversion check is less strict than Jessie? Hi all, I used Jessie plug-in before I tried wp. Jessie will not tolerate the following situation where a int constant is to be converted to unsigned int* -------------------------------------------------------------- #define ARTAR ( (unsigned int * )0x01f800e0) ) unsigned int sr; sr = ARTAR; -------------------------------------------------------------- [jessie] failure: Casting from type int to type struct unsigned_intP * not allowed However, as I run wp plug-in over the same C file: $ frama-c -pp-annot -wp -wp-rte -wp-prover why3ide file.c I did not get any complaints from wp, and the VCs( very simple though) seems proved already: [wp] Running WP plugin... [wp] Collecting axiomatic usage [rte] annotating function SerialBaud [wp] Goal typed_SB_b1_post : trivial [wp] Goal typed_SB_b2_post : trivial Jessie and WP behaves so differently in type conversion check (for this case) ? Is it that type check is turned off by default in WP? or I did not invoke wp in the correct way.. Any hints would be appreciated. Thanks.. cheers xiao-lei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20131209/c3ae11f7/attachment.html>