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

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200112270247.DAA14839@father.ludd.luth.se>
Subject: Re: gcc 3.03 and libc sources
In-Reply-To: <000401c18e3d$5c0b2cb0$cef8e0d5@zastaixp> from Tim Van Holder at "Dec 26, 2001 07:44:32 pm"
To: djgpp-workers AT delorie DOT com
Date: Thu, 27 Dec 2001 03:47:48 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
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

According to Tim Van Holder:
> > 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)?

I tried to add "--std=c89" to gcc.opt and got an immense amount of
warnings from trying to make dosexec.o so I'm not sure what to try
now.

But it's strange that -Wsign-compare affects this case. As Eli says
there's no comparision with signed and unsigned going on.


Right,

						MartinS

- Raw text -


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