delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/02/16:48:14

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: <200203022148.WAA05398@father.ludd.luth.se>
Subject: Re: gcc 3.03 and libc sources
In-Reply-To: <2427-Sat02Mar2002210512+0200-eliz@is.elta.co.il> from Eli Zaretskii at "Mar 2, 2002 09:05:12 pm"
To: djgpp-workers AT delorie DOT com
Date: Sat, 2 Mar 2002 22:48:11 +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 Eli Zaretskii:
> > From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> > Date: Sat, 2 Mar 2002 17:41:05 +0100 (MET)
> > 
> >    if (!check_talloc(found_si ?
> > -                   type->stubinfo->struct_length : 0
> > +                   (unsigned int)(type->stubinfo->struct_length) : 0
> >                     + (argc+1)*sizeof(short)))
> >    {
> >      argv[0] = save_argv0;
> 
> What is the problem here, exactly?  Does GCC handle zero as an
> unsigned constant or something?

No. We have type->stubinfo->struct_length as signed. 0 +
(argc+1)*sizeof(short) is unsigned (assumption). Probably because of
sizeof().

> I still think it's a bug.  The normal C promotion rules for integral
> types should take care of the different types.

Yes, in a similar way promotion rules would take care of if(
signed_value < unsigned_value ).


Right,

						MartinS





- Raw text -


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