From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25677 invoked by alias); 28 Dec 2006 23:08:18 -0000 Received: (qmail 25663 invoked by uid 22791); 28 Dec 2006 23:08:17 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Dec 2006 23:08:11 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 0ACF8122A8; Fri, 29 Dec 2006 00:08:09 +0100 (CET) From: Andreas Schwab To: Mark Kettenis Cc: drow@false.org, gdb-patches@sourceware.org Subject: Re: RFC: Warning fixes References: <20061228195828.GA18628@nevyn.them.org> <200612282256.kBSMu65R022410@brahms.sibelius.xs4all.nl> X-Yow: I think I'll do BOTH if I can get RESIDUALS!! Date: Thu, 28 Dec 2006 23:08:00 -0000 In-Reply-To: <200612282256.kBSMu65R022410@brahms.sibelius.xs4all.nl> (Mark Kettenis's message of "Thu, 28 Dec 2006 23:56:06 +0100 (CET)") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00336.txt.bz2 Mark Kettenis writes: > ISO C clearly states that enumeration constants have type 'int', so > sig could be negative, and we defenitely want to catch that case. If > GCC thinks it knows that (sig >= TARGET_SIGNAL_FIRST), I think it is > being too smart for its own good. The compiler can chose any signed or unsigned type for the enumeration _type_ to be compatible with, provided that the type can represent all members of it. So it is perfectly valid for the compiler to chose an unsigned type for an emumeration that only consists of non-negative values. This is independent of the type of the enum constants itself. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."