Commit ae962e57 by Martin Sebor

PR driver/90983 - manual documents `-Wno-stack-usage` flag but it is unrecognized

gcc/ChangeLog:

	PR driver/90983
	* common.opt (-Wno-frame-larger-than): New option.
	(-Wno-larger-than, -Wno-stack-usage): Same.

gcc/testsuite/ChangeLog:

	PR driver/90983
	* gcc.dg/Wframe-larger-than-3.c: New test.
	* gcc.dg/Wlarger-than4.c: New test.
	* gcc.dg/Wstack-usage.c: New test.
parent 9a453da5
2020-04-23 Martin Sebor <msebor@redhat.com>
PR driver/90983
* common.opt (-Wno-frame-larger-than): New option.
(-Wno-larger-than, -Wno-stack-usage): Same.
2020-04-23 Andrew Stubbs <ams@codesourcery.com> 2020-04-23 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn-valu.md (mov<mode>_exec): Swap the numbers on operands * config/gcn/gcn-valu.md (mov<mode>_exec): Swap the numbers on operands
......
...@@ -601,6 +601,10 @@ Wframe-larger-than= ...@@ -601,6 +601,10 @@ Wframe-larger-than=
Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_frame_larger_than_size) Init(HOST_WIDE_INT_MAX) Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_frame_larger_than_size) Init(HOST_WIDE_INT_MAX)
-Wframe-larger-than=<byte-size> Warn if a function's stack frame requires in excess of <byte-size>. -Wframe-larger-than=<byte-size> Warn if a function's stack frame requires in excess of <byte-size>.
Wno-frame-larger-than
Common Alias(Wframe-larger-than=,18446744073709551615EiB,none) Warning
Disable -Wframe-larger-than= warning. Equivalent to -Wframe-larger-than=<SIZE_MAX> or larger.
Wfree-nonheap-object Wfree-nonheap-object
Common Var(warn_free_nonheap_object) Init(1) Warning Common Var(warn_free_nonheap_object) Init(1) Warning
Warn when attempting to free a non-heap object. Warn when attempting to free a non-heap object.
...@@ -631,6 +635,10 @@ Wlarger-than= ...@@ -631,6 +635,10 @@ Wlarger-than=
Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_larger_than_size) Init(HOST_WIDE_INT_MAX) Common RejectNegative Joined Host_Wide_Int ByteSize Warning Var(warn_larger_than_size) Init(HOST_WIDE_INT_MAX)
-Wlarger-than=<byte-size> Warn if an object's size exceeds <byte-size>. -Wlarger-than=<byte-size> Warn if an object's size exceeds <byte-size>.
Wno-larger-than
Common Alias(Wlarger-than=,18446744073709551615EiB,none) Warning
Disable -Wlarger-than= warning. Equivalent to -Wlarger-than=<SIZE_MAX> or larger.
Wnonnull-compare Wnonnull-compare
Var(warn_nonnull_compare) Warning Var(warn_nonnull_compare) Warning
Warn if comparing pointer parameter with nonnull attribute with NULL. Warn if comparing pointer parameter with nonnull attribute with NULL.
...@@ -704,6 +712,10 @@ Wstack-usage= ...@@ -704,6 +712,10 @@ Wstack-usage=
Common Joined RejectNegative Host_Wide_Int ByteSize Var(warn_stack_usage) Warning Init(HOST_WIDE_INT_MAX) Common Joined RejectNegative Host_Wide_Int ByteSize Var(warn_stack_usage) Warning Init(HOST_WIDE_INT_MAX)
-Wstack-usage=<byte-size> Warn if stack usage might exceed <byte-size>. -Wstack-usage=<byte-size> Warn if stack usage might exceed <byte-size>.
Wno-stack-usage
Common Alias(Wstack-usage=,18446744073709551615EiB,none) Warning
Disable Wstack-usage= warning. Equivalent to Wstack-usage=<SIZE_MAX> or larger.
Wstrict-aliasing Wstrict-aliasing
Common Warning Common Warning
Warn about code which might break strict aliasing rules. Warn about code which might break strict aliasing rules.
......
2020-04-23 Martin Sebor <msebor@redhat.com>
PR driver/90983
* gcc.dg/Wframe-larger-than-3.c: New test.
* gcc.dg/Wlarger-than4.c: New test.
* gcc.dg/Wstack-usage.c: New test.
2020-04-23 Patrick Palka <ppalka@redhat.com> 2020-04-23 Patrick Palka <ppalka@redhat.com>
* g++.dg/cpp0x/dependent3.C: New test. * g++.dg/cpp0x/dependent3.C: New test.
......
/* PR 90983/manual documents `-Wno-stack-usage` flag, but it is unrecognized
{ dg-do compile }
{ dg-options "-Wall -Wframe-larger-than=123 -Wno-frame-larger-than" } */
void f (void*);
void g (void)
{
char a [1234];
f (a);
}
/* PR 90983/manual documents `-Wno-stack-usage` flag, but it is unrecognized
{ dg-do compile }
{ dg-options "-Wall -Wlarger-than=123 -Wno-larger-than" } */
char a [1234];
/* PR 90983/manual documents `-Wno-stack-usage` flag, but it is unrecognized
{ dg-do compile }
{ dg-options "-Wall -Wstack-usage=123 -Wno-stack-usage" } */
void f (void*);
void g (int n)
{
if (n < 1234)
n = 1234;
char a [n];
f (a);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment