copy line and pragma directive parsers from lexer
[cparser] / cparser.1
index 5f103d9..87dedd2 100644 (file)
--- a/cparser.1
+++ b/cparser.1
@@ -1,5 +1,5 @@
 .\" Please adjust this date whenever revising the manpage.
 .\" Please adjust this date whenever revising the manpage.
-.Dd December 21, 2008
+.Dd June 21, 2011
 .Dt CPARSER 1
 .Sh NAME
 .Nm cparser
 .Dt CPARSER 1
 .Sh NAME
 .Nm cparser
@@ -14,7 +14,7 @@
 .Op Fl - Ns Oo Cm no- Oc Ns Cm ms
 .Op Fl g
 .Op Fl O Ns Ar level
 .Op Fl - Ns Oo Cm no- Oc Ns Cm ms
 .Op Fl g
 .Op Fl O Ns Ar level
-.Op Fl W Ns Oo Cm no- Oc Ns Ar warn
+.Op Fl W Ns Oo Cm no- Oc Ns Oo Cm error= Oc Ns Ar warning
 .Op Fl w
 .Op Fl I Ar dir
 .Op Fl L Ar dir
 .Op Fl w
 .Op Fl I Ar dir
 .Op Fl L Ar dir
@@ -91,12 +91,17 @@ format.
 .\" TODO expand
 Select the optimization level.
 Sensible values are between 0 and 4, inclusive.
 .\" TODO expand
 Select the optimization level.
 Sensible values are between 0 and 4, inclusive.
-.It Fl W Ns Oo Cm no- Oc Ns Ar warn
 .\" TODO expand
 .\" TODO expand
-Disable/enable a specific warning.
-Every warning option has a corresponding
-.Cm no-
-switch to deactivate it.
+.It Fl W Ns Ar warning
+Enable the specified warning.
+.It Fl Wno- Ns Ar warning
+Disable the specified warning.
+.It Fl Werror= Ns Ar warning
+Enable the specified warning and turn it into an error.
+.It Fl Wno-error= Ns Ar warning
+Force the specified warning to only be a warning, even in the presence of
+.Fl Werror .
+This neither enables nor disables the warning itself.
 .It Fl Waddress
 Warn about suspicious use of addresses, like using the address of a function or variable as boolean condition or comparing with the address of a string literal.
 .It Fl Waggregate-return
 .It Fl Waddress
 Warn about suspicious use of addresses, like using the address of a function or variable as boolean condition or comparing with the address of a string literal.
 .It Fl Waggregate-return
@@ -119,7 +124,7 @@ In particular these are
 .Fl Wpointer-arith ,
 .Fl Wredundant-decls ,
 .Fl Wreturn-type ,
 .Fl Wpointer-arith ,
 .Fl Wredundant-decls ,
 .Fl Wreturn-type ,
-.Fl Wshadow ,
+.Fl Wshadow-local ,
 .Fl Wsign-compare ,
 .Fl Wstrict-prototypes ,
 .Fl Wswitch-enum ,
 .Fl Wsign-compare ,
 .Fl Wstrict-prototypes ,
 .Fl Wswitch-enum ,
@@ -144,12 +149,13 @@ Warn about empty statements, i.e. statements which only consist of a single
 Use {} as replacement to avoid this warning.
 .It Fl Werror
 Treat warnings as errors, i.e. do not continue after parsing when a warning is encountered.
 Use {} as replacement to avoid this warning.
 .It Fl Werror
 Treat warnings as errors, i.e. do not continue after parsing when a warning is encountered.
-.It Fl Werror-implicit-function-declaration
-Generate an error, when calling a function without a prior declaration.
 .It Fl Wextra
 .It Fl Wextra
+(Alias
+.Fl W Ns )
 Activate some more warnings.
 In particular these are
 .Fl Wempty-statement ,
 Activate some more warnings.
 In particular these are
 .Fl Wempty-statement ,
+.Fl Wshadow ,
 .Fl Wunused-parameter ,
 .Fl Wunused-value .
 .It Fl Wfatal-errors
 .Fl Wunused-parameter ,
 .Fl Wunused-value .
 .It Fl Wfatal-errors
@@ -205,6 +211,10 @@ Warn if + or - is used as operand of << or >>, e.g. x\ +\ y\ <<\ z.
 Warn about redundant declarations, i.e. multiple declarations of the same object or static forward declarations which have no use before their definition.
 .It Fl Wshadow
 Warn when a new declaration shadows another declaration with the same name in an outer scope.
 Warn about redundant declarations, i.e. multiple declarations of the same object or static forward declarations which have no use before their definition.
 .It Fl Wshadow
 Warn when a new declaration shadows another declaration with the same name in an outer scope.
+.It Fl Wshadow-local
+Like
+.Fl Wshadow ,
+but only warn if the shadowed declaration is not global, e.g. a local variable shadows a parameter or another local variable.
 .It Fl Wunreachable-code
 Warn when the compiler determines that a statement (or in some cases a part thereof) will never be executed.
 .It Fl Wunused
 .It Fl Wunreachable-code
 Warn when the compiler determines that a statement (or in some cases a part thereof) will never be executed.
 .It Fl Wunused
@@ -245,6 +255,9 @@ Set a frontend or optimizer option.
 Use
 .Fl fhelp
 to get a list of supported optimizer options.
 Use
 .Fl fhelp
 to get a list of supported optimizer options.
+.It Fl f Ns Oo Cm no- Oc Ns Cm diagnostics-show-option
+Show the switch, which controls a warning, after each warning.
+Default is on.
 .It Fl finput-charset= Ns Ar encoding
 Select the encoding of the input.
 Supported values are
 .It Fl finput-charset= Ns Ar encoding
 Select the encoding of the input.
 Supported values are
@@ -267,10 +280,16 @@ and
 .Cm ISO_8859-15
 and
 .Cm Latin-9 Ns
 .Cm ISO_8859-15
 and
 .Cm Latin-9 Ns
+),
+.Cm windows-1252
+(alias
+.Cm cp1252 Ns
 ) and
 .Cm UTF-8
 (default).
 Case is ignored.
 ) and
 .Cm UTF-8
 (default).
 Case is ignored.
+.It Fl f Ns Oo Cm no- Oc Ns Cm show-column
+Show the column number in diagnostic messages.
 .It Fl fsigned-char
 Define
 .Sq char
 .It Fl fsigned-char
 Define
 .Sq char