🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50603

Help! -Wtraditional

#50603
From: Neuralog
Date: Tue, 07 Sep 1993 16:21
32 lines
1811 bytes
Hello,

I've just installed gcc 2.4.5 on a SS2 with SunOS 4.1.2 and am very
happy with its performance! Some of my significant code speeds along
at about 40% faster than with bundled cc.

But... The reason I got gcc was to make an existing project become
more ansi compliant as opposed to K&R.  My problem is this:

K&R (at least bundled cc) passes structures by reference even if
the syntax indicates otherwise.

Ansi passes structures by reference or value depending on the syntax.

No compiler I've found will tag instances where structures (possibly
typedefs) are passed by value. Ive also tried lint.  I can't simply
convert the 60K+ lines to prototypes and compile ansi to find the
problems because the VAST majority of calls are through function
pointers within typedef'd C objects and so prototypes are no help.

My thaught was that gcc -Wtraditional would point out the instances
where (in error) structures are passed by value.  It does not.
Can anyone tell me why, or what I'm doing wrong?  Other gcc flags?
Other tools?

Any help would be greatly appreciated.


Ken Land
neuralog@neosoft.com
1-713-474-5279 voice
1-713-474-3868 fax
Technical Details
Message-ID: <CCzs3K.105@sugar.NeoSoft.COM>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!swrinde!menudo.uh.edu!uuneo!sugar!neuralog

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e5f801443a9685a1,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-09-07 16:25:09 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!swrinde!menudo.uh.edu!uuneo!sugar!neuralog
From: neuralog@NeoSoft.com (Neuralog)
Subject: Help! -Wtraditional
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Tue, 7 Sep 1993 16:21:19 GMT
Message-ID: <CCzs3K.105@sugar.NeoSoft.COM>
Followup-To: neuralog@neosoft.com 
Summary: Passing structs by value vs. reference
Lines: 37