🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50328

Re: Static analysis of g++ call flow

#50328
From: Richard Stallman
Date: Fri, 08 Oct 1993 14:39
24 lines
1635 bytes
      We are trying to use the output produced/generated from the flow analysis
    phase of the compile to develop a kind of static call tree of our code. 

To generate a call tree as a byproduct of compilation is a tempting
idea, but it has a fundamental flaw.  You can't generate a complete
call graph from any kind of output from cc1 (or cc1plus), because they
don't know about all the calls that are in the source.

For example, if a function contains this:

#ifdef vax
     foo ();
#endif

and you happen to be on a sun, by the time cc1 is running there is no
trace of the fact that a call to foo was present there.

If you rely on incomplete data for doing maintenance, bugs will
result.  When you change the way to call foo, you need to find *all*
the calls, not just those that happen to be enabled on the target you
are using today.

For this reason, I believe cross-referencing ought to be done by
parsing the source directly, *without* going through cpp.
Technical Details
Message-ID: <9310081435.AA24961@mole.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms
References: <9310081415.AA10678@TIS.COM>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b96c32e932f5d2d3
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-10-08 07:51:40 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms
From: rms@gnu.ai.mit.edu (Richard Stallman)
Newsgroups: gnu.gcc.help
Subject: Re: Static analysis of g++ call flow
Date: 8 Oct 1993 10:39:51 -0400
Organization: GNUs Not Usenet
Lines: 25
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9310081435.AA24961@mole.gnu.ai.mit.edu>
References: <9310081415.AA10678@TIS.COM>