Frama-C-discuss mailing list archives
This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Frama-c-discuss] Problem with bitwise xor
- Subject: [Frama-c-discuss] Problem with bitwise xor
- From: Claude.Marche at inria.fr (Claude Marche)
- Date: Thu, 03 Dec 2009 12:37:20 +0100
- In-reply-to: <FC0686BB6178BC43B9DC035287A11A720DBE768875@SI-MBX12.de.bosch.com>
- References: <FC0686BB6178BC43B9DC035287A11A720DBE768875@SI-MBX12.de.bosch.com>
Hollas Boris (CR/AEY1) wrote: > In this code snippet, Jessie can't verify arithmetic overflow: > > > typedef unsigned int uint32; > > uint32 Xor( uint32 x, uint32 y ) > { > return x ^ y; > } > > > This looks like a bug to me. I use Beryllium 1. > > Sorry for the dumb answer: with which values of x and y do not you think there is an overflow ? I don't even understand what arithmetic overflow may mean for xor. Arithmetic overflow is a potential source of bugs with +, -, * and / that we try to prevent by default, because in general these operations should not overflow. It is just a matter of choice, because there is no corresponding runtime error. Similarly, there is no possible runtime error in C for xor. What kind of general mistake could occur with xor ? - Cladue -- Claude March? | tel: +33 1 72 92 59 69 INRIA Saclay - ?le-de-France | mobile: +33 6 33 14 57 93 Parc Orsay Universit? | fax: +33 1 74 85 42 29 4, rue Jacques Monod - B?timent N | http://www.lri.fr/~marche/ F-91893 ORSAY Cedex |
- Follow-Ups:
- [Frama-c-discuss] Problem with bitwise xor
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Problem with bitwise xor
- References:
- [Frama-c-discuss] Problem with bitwise xor
- From: Boris.Hollas at de.bosch.com (Hollas Boris (CR/AEY1))
- [Frama-c-discuss] Problem with bitwise xor
- Prev by Date: [Frama-c-discuss] Problem with memset
- Next by Date: [Frama-c-discuss] Lemma from ACSL doc doesn't verify
- Previous by thread: [Frama-c-discuss] Problem with bitwise xor
- Next by thread: [Frama-c-discuss] Problem with bitwise xor
- Index(es):