From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21721 invoked by alias); 4 Nov 2005 12:20:36 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21697 invoked by uid 22791); 4 Nov 2005 12:20:32 -0000 Received: from exprod6og2.obsmtp.com (HELO psmtp.com) (64.18.1.122) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Fri, 04 Nov 2005 12:20:32 +0000 Received: from source ([192.150.20.142]) by exprod6ob2.obsmtp.com ([64.18.5.12]) with SMTP; Fri, 04 Nov 2005 04:20:26 PST Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id jA4CQaXP026620; Fri, 4 Nov 2005 04:26:37 -0800 (PST) Received: from fe2.corp.adobe.com (fe2.corp.adobe.com [10.8.192.72]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id jA4CKMn2019814; Fri, 4 Nov 2005 04:20:23 -0800 (PST) Received: from namail3.corp.adobe.com ([10.8.192.66]) by fe2.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 4 Nov 2005 04:20:22 -0800 Received: from 10.32.16.88 ([10.32.16.88]) by namail3.corp.adobe.com ([10.8.192.66]) via Exchange Front-End Server namailhost.corp.adobe.com ([10.8.192.72]) with Microsoft Exchange Server HTTP-DAV ; Fri, 4 Nov 2005 12:20:22 +0000 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Fri, 04 Nov 2005 12:20:00 -0000 Subject: Re: -Wconversion producing incorrect warning From: John Love-Jensen To: Segher Boessenkool , "Kevin P. Fleming" CC: MSX to GCC Message-ID: In-Reply-To: <88b9f6ad3ed768b532e3485abc8a24bd@kernel.crashing.org> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-SW-Source: 2005-11/txt/msg00038.txt.bz2 Hi Segher, > The problem here is, that -Wconversion does _not_ warn about type conversions in your code! From: http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Warning-Options.html ------------------------------------------------------------------- -Wconversion Warn if a prototype causes a type conversion that is different from what would happen to the same argument in the absence of a prototype. This includes conversions of fixed point to floating and vice versa, and conversions changing the width or signedness of a fixed point argument except when the same as the default promotion. Also, warn if a negative integer constant expression is implicitly converted to an unsigned type. For example, warn about the assignment x = -1 if x is unsigned. But do not warn about explicit casts like (unsigned) -1. ------------------------------------------------------------------- What kind of type conversions in your code are you referring to? --Eljay