X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f From: Martin Str|mberg 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Precedence: bulk According to Eli Zaretskii: > > From: Martin Str|mberg > > 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