This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48088] -Werror=frame-larger-than=100 does not work as expected
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Mar 2011 09:21:01 +0000
- Subject: [Bug c/48088] -Werror=frame-larger-than=100 does not work as expected
- Auto-submitted: auto-generated
- References: <bug-48088-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48088
--- Comment #4 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2011-03-15 09:20:47 UTC ---
(In reply to comment #3)
> (In reply to comment #2)
> > Yeah. Confirmed.
> >
> > You need -Wframe-larger-than=500 -Werror=frame-larger-than which hopefully
> > doesn't reset the value to 1.
>
> It doesn't, but not for the reason you would hope. 8-)
These are indeed several bugs related to not handling W options with parameters
properly. Check in options.c (enable_warning_as_error) for how -Werror=option
is handled and...
> /tmp/x.c:3:1: error: the frame size of 32 bytes is larger than 1 bytes
> [-Werror=frame-larger-than=]
diagnostics.c for how this is printed. This should print
-Werror=frame-larger-than=1 (without -Werror, does it print
[-Wframe-larger-than=1]) ?
I guess similar problems arise with Wlarger-than=, Woverflow= and
Wstrict-aliasing= (but perhaps the two latter are handled differently).
Fixing it should be fairly trivial.