diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-20 21:05:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-07-20 21:05:23 +0000 |
commit | 3c1bb48f3e96b9286e5087f766cc4528496f46df (patch) | |
tree | 7b65804e6d43d1c46c245b791f9613994047c6c7 /share | |
parent | a1f3f924b2978f47d07ab694ed46bb3cf5cc7950 (diff) |
Introduce a new compiler warning, -Wstack-larger-than-N, to report
functions which are too greedy in stack variables.
This is intended to be used for kernel compiles, where this warning will
be enabled for a reasonable size (after a few weeks grace period so that
people can upgrade their compiler).
Please note that this warning relies upon md code, and as such is only
available on platforms OpenBSD runs on; also, the stack size being warned
on is only the local variables size, regardless of the ABI stack usage
requirements and the callee-saved registers; which means a function may
be warning-clean yet need more stack space than meets the eye; the
actual size being checked on may change to include these extras in the
future.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man1/gcc-local.1 | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/share/man/man1/gcc-local.1 b/share/man/man1/gcc-local.1 index fc09a4c67da..09e024aefee 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.12 2006/04/11 10:36:23 espie Exp $ +.\" $OpenBSD: gcc-local.1,v 1.13 2006/07/20 21:05: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 January 3, 2005 +.Dd July 16, 2006 .Dt GCC-LOCAL 1 .Os .Sh NAME @@ -225,6 +225,15 @@ that lets comments in macros pass through to the output (except in mode). This is used to allow annotations in macros for .Xr lint 1 . +.It +A new warning, +.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 in account for this check. .El .Sh ATTRIBUTES The |