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]
Other format: [Raw text]

Re: [PATCH] New flag -Wframe-larger-than-


On Feb 16, 2008 4:28 AM, Richard Sandiford <rsandifo@nildram.co.uk> wrote:
> ""Seongbae Park (박성배, 朴成培)"" <seongbae.park@gmail.com> writes:
> > +@item -Wframe-larger-than-@var{len}
> > +@opindex Wframe-larger-than
> > +Warn whenever the size of a function frame is larger than @var{len} bytes.
>
> I might be being paranoid, but would it be worth adding some weasel
> words to say that frame sizes might go up as well as down when moving
> to a newer release?  This isn't the sort of thing you could safely use
> with -Werror, for example.

I prefer to keep it simple, but others may disagree.
Naturally, the option doesn't and can't guarantee what will happen
in the next release - it could very well go up in the new release
and then the option will start triggering if it exceeded the threshold there.
The intent is to prevent function bodies which frame size
exceeds certain threshold - i.e. the warning is not about the source code,
but about the object code (since frame size is a characteristic
of the object code).

> (Also, this patch only accounts for the target-independent parts
> of the frame size.  It doesn't include register save areas, etc.)

True. Consider this as the first order approximation for targets with such.
I guess targets with significant register save areas may consider
implementing this flag inside the backend.

Seongbae

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