🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #103

Re: Couple of problems in building gdb

#103
From: gnu
Date: Mon, 20 Jul 1992 05:17
27 lines
1388 bytes
> While compiling, many warnings about shifts of n (12, 16 usually) > object
> size of 8.

These are due to bugs in the vendor's compiler.

It is perfectly valid to shift a small object by a larger number of bits.
E.g.

	unsigned char uc;
	long foo = uc << 16;

A char is automatically promoted to int or unsigned int whenever it is
used in arithmetic, according to the rules of C (either traditional or ANSI).
Therefore the warning is meaningless and useless.

Ignore the warnings -- or, preferably, file a bug report with the
vendor about it.

I have also seen warnings about shifts "changing in ANSI C" from other
compilers.  This is yet another compiler bug.  The code which they
are complaining about does *not* change meanings between traditional 
and ANSI C.  We could have inserted explicit casts to shut up the warnings.
We would prefer if GDB users complained to their vendors about the
compiler bugs instead.

	John Gilmore
	Cygnus Support
Technical Details
Message-ID: <9207201917.AA19777@cygnus.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!gnu
References: <199207201117.AA16579@nadia.ircam.fr>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!gnu
From: gnu@cygnus.com
Subject: Re: Couple of problems in building gdb
Message-ID: <9207201917.AA19777@cygnus.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
References: <199207201117.AA16579@nadia.ircam.fr>
Distribution: gnu
Date: Mon, 20 Jul 1992 05:17:15 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 28