From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10934 invoked by alias); 15 Jul 2009 14:15:57 -0000 Received: (qmail 10774 invoked by alias); 15 Jul 2009 14:15:39 -0000 Date: Wed, 15 Jul 2009 14:15:00 -0000 Message-ID: <20090715141539.10773.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/40752] -Wconversion: do not warn for operands not larger than target type In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "joseph at codesourcery dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg01292.txt.bz2 ------- Comment #10 from joseph at codesourcery dot com 2009-07-15 14:15 ------- Subject: Re: -Wconversion: do not warn for operands not larger than target type On Wed, 15 Jul 2009, ian at airs dot com wrote: > Sure, it can wrap, but -Wconversion is not for wrapping warnings. It's for warnings about implicit conversions changing a value; the arithmetic, in a wider type (deliberately or otherwise), does not wrap, but the value gets changed by the implicit conversion back to char. If the user had explicit casts to int in their arithmetic, there could be no doubt that the warning is appropriate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40752