diff options
author | 2008-04-21 11:53:48 -0700 | |
---|---|---|
committer | 2008-04-21 11:53:48 -0700 | |
commit | 32dd96be4de207b09559d9b71c4cd6f7cb0cb4e2 (patch) | |
tree | b73d3dece1a2f38f3a6daf78ac4c4d51691322f2 /sparse.1 | |
parent | improve -Wcontext code and messages (diff) | |
download | sparse-32dd96be4de207b09559d9b71c4cd6f7cb0cb4e2.tar.gz sparse-32dd96be4de207b09559d9b71c4cd6f7cb0cb4e2.tar.bz2 sparse-32dd96be4de207b09559d9b71c4cd6f7cb0cb4e2.zip |
Add -Wno-declaration-after-statement
This adds -W[no-]declaration-after-statement, which makes warnings about
declarations after statements a command-line option. (The code to implement
the warning was already in there via a #define; the patch just exposes it
at runtime.) Rationale: C99 allows them, C89 doesn't.
Signed-off-by: Geoff Johnstone <geoff.johnstone@googlemail.com>
Diffstat (limited to 'sparse.1')
-rw-r--r-- | sparse.1 | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -135,6 +135,16 @@ Sparse issues these warnings by default. To turn them off, use \fB\-Wno\-decl\fR. . .TP +.B \-Wdeclaration-after-statement +Warn about declarations that are not at the start of a block. + +These declarations are permitted in C99 but not in C89. + +Sparse issues these warnings by default only when the C dialect is +C89 (i.e. -ansi or -std=c89). To turn them off, use +\fB\-Wno\-declaration\-after\-statement\fR. +. +.TP .B \-Wdefault\-bitfield\-sign Warn about any bitfield with no explicit signedness. |