This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR18963

"Joseph S. Myers" <> writes:

> On Sun, 19 Dec 2004, James A. Morrison wrote:
> >   This chunk of code is useless now that static function declarations are
> > thrown away when they are not at file scope.  It also gets rid of the ICE
> > caused in pr18963.  Bootstrapped and regtested on sparc-linux with no new
> Do you mean that the code is *wrong* rather than *useless*: that is, it 
> can trigger (in the case of that PR), and it is proper that the conditions 
> for it triggering are met but the actions when it triggers are wrong (and 
> so the code should be removed rather than replaced by an assertion)?  If 
> it were simply useless - the conditions could no longer be met for the 
> code to execute - an assertion that this is the case would be more 
> appropriate than simple removal.

 I mean to say the code is useless to do what the comment says.  However,
the code is also wrong since the conditions for the this bit of code can be
triggered, as shown by the test case.  The code will only trigger for
FUNCTION_DECLs that are not external, which right now is function declarations
that have storage class auto.  Functions declarations that have storage class
auto will be nested functions so the declarations certainly shouldn't be
merged with any declarations for static functions.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]