This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [PATCH]: two warnings useful for monitoring stack usage


good point, will do.

-David

Thu, Jan 25, 2001 at 09:41:01PM +0000 wrote:
> David Whedon wrote:-
> 
> > +  else if (!strncmp (p, "-Wlarge-frame-size=", 19)){
> > +      const char *argstart = &p[19];
> > +      char *endptr;
> > +      warn_large_frame_size = strtol(argstart, &endptr, 10);
> > +      if (endptr==argstart){
> > +	  error ("Invalid frame size `%s'", argstart);
> > +      }
> > +      else
> > +	  warn_large_frame = 1;
> 
> This logic, like some I recently fixed for -Wlarger-than- (but not yet
> received approval for) is not robust.  A second incorrect switch can
> hijack the correctness of an earlier switch.  Can I suggest you update
> warn_large_frame unconditionally (and similarly for the other one)?
> 
> Neil.

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