🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49479

Re: controlling gcc warnings

#49479
From: Michael T.Y. McNamara
Date: Tue, 25 Jan 1994 00:09
45 lines
2287 bytes
|HI,
|When I run gcc on some source here I get this error:
|
|/usr/include/obj_ext.h:5: warning: useless keyword or type name in empty declaration
|/usr/include/obj_ext.h:6: warning: useless keyword or type name in empty declaration
|/usr/include/obj_ext.h:7: warning: useless keyword or type name in empty declaration
|/usr/include/obj_ext.h:8: warning: useless keyword or type name in empty declaration
|/usr/include/obj_ext.h:9: warning: useless keyword or type name in empty declaration
|
|and the corresponding source is
|
|extern struct obj;
|extern struct obj;
|extern struct obj_type;
|extern struct obj_type;
|extern struct obj_list;
|extern struct obj_list;

The extern is a 'useless keyword' in an 'empty declaration'.

It has no meaning whatsoever.

You can save 7 bytes of space by deleting it.  Think of all the baby
bytes that will be so happy that their mommy or daddy was not
sacrificed (oops, sorry...  :-)

If you had typed

extern struct obj foo;

then the extern would have a non empty declaration to refer to (the foo).

but

extern struct obj;

really has absolutly no meaning what so ever.

Other C compilers simply ignore it; gcc 2.x.x warns about it.

--
,------. Michael McNamara  Send mail to info@chronologic.com for INFO
|CHRONO|LOGIC  SIMULATION      to support@chronologic.com for SUPPORT
`------' See our AD in EE Times!  For information, call 1-800-VERILOG
Technical Details
Message-ID: <MAC.94Jan24160913@rhea.chronologic.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!news.kpc.com!kpc!chrnlgc!themis!mac
References: <1994Jan22.215515.19378@seas.smu.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,60bcc2a4e25648c7
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-01-25 04:44:39 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!zib-berlin.de!netmbx.de!Germany.EU.net!EU.net!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!news.kpc.com!kpc!chrnlgc!themis!mac
From: mac@rhea.chronologic.com (Michael T.Y. McNamara)
Subject: Re: controlling gcc warnings
In-Reply-To: shyamal@seas.smu.edu's message of Sat, 22 Jan 1994 21:55:15 GMT
To: shyamal@seas.smu.edu (Shyamal Prasad)
Message-ID: <MAC.94Jan24160913@rhea.chronologic.com>
Lines: 45
Sender: usenet@chronologic.com
Nntp-Posting-Host: rhea
Reply-To: mac@chronologic.com
Organization: Chronologic Simulation
References: <1994Jan22.215515.19378@seas.smu.edu>
Date: Tue, 25 Jan 1994 00:09:13 GMT