delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/26/14:00:21

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Subject: Re: gcc 3.03 and libc sources
Date: Wed, 26 Dec 2001 19:44:32 +0100
Message-ID: <000401c18e3d$5c0b2cb0$cef8e0d5@zastaixp>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3416
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
In-Reply-To: <7458-Wed26Dec2001094429+0200-eliz@is.elta.co.il>
Importance: Normal
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> But what GCC flags in the cases you mentioned is something very
> different: there's no comparison between signed and unsigned
> values in those cases.  What we have is an expression that 
> sometimes yields signed values and sometimes unsigned values. 
>  What's wrong with that?

I think there's a rule in either ANSI C++ or C99 that says that
both values in a conditional expression (?:) need to be the exact
same type (including signedness).
gcc3 enforces this rule by default; so I don't think a gcc bug
report is in order (unless it's mistakenly identifying the two
types as different, of course).  Does this warning happen if you
use --std=c89 (or whatever thay option is)?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019