From 411b684d5c659555d94f6bd0893da1da15ef157f Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 26 Nov 2007 22:47:23 +0000 Subject: Add a new warning to gcc, -Wvariable-decl, which causes it to warn for auto declarations which size are not known at compile time. This flag will eventually be added to the kernel makefiles so that we can rely on -Wstack-larger-than work. ok deraadt@ mbalmer@ otto@ marco@ --- share/man/man1/gcc-local.1 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/man/man1/gcc-local.1 b/share/man/man1/gcc-local.1 index 29c6aa1f96d..30833005748 100644 --- a/share/man/man1/gcc-local.1 +++ b/share/man/man1/gcc-local.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gcc-local.1,v 1.15 2007/05/31 19:19:48 jmc Exp $ +.\" $OpenBSD: gcc-local.1,v 1.16 2007/11/26 22:47:22 miod Exp $ .\" .\" Copyright (c) 2002 Marc Espie .\" Copyright (c) 2003 Anil Madhavapeddy @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: November 26 2007 $ .Dt GCC-LOCAL 1 .Os .Sh NAME @@ -226,14 +226,24 @@ mode). This is used to allow annotations in macros for .Xr lint 1 . .It -A new warning, -.Fl Wstack-larger-than-N , +On +.Ox , +.Nm gcc +supports two extra warning options: +.Bl -item +.It +.Fl Wstack-larger-than-N will report functions using more than .Va N bytes of stack space for their local variables. Stack space used for other purposes (such as register window saving, callee-saved registers, outbound arguments storage, etc.)\& is not taken into account for this check. +.It +.Fl Wvariable-decl +will report automatic variable declarations whose size can not be +determined at compile-time. +.El .El .Sh ATTRIBUTES The -- cgit v1.2.3