X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=cparser.1;h=3700bd904248635515cbaff63578f1865b1e2683;hb=02d9198a5f0b8133e882e5d764acab5c74701b58;hp=1e2cbe8675072d22fed219cbc7d9e6c76b918a18;hpb=50aedc47cf180c94522c651b75f0fe90b5852d79;p=cparser diff --git a/cparser.1 b/cparser.1 index 1e2cbe8..3700bd9 100644 --- a/cparser.1 +++ b/cparser.1 @@ -1,5 +1,5 @@ .\" Please adjust this date whenever revising the manpage. -.Dd December 9, 2008 +.Dd December 21, 2008 .Dt CPARSER 1 .Sh NAME .Nm cparser @@ -21,6 +21,7 @@ .Op Fl D Ns Ar macro Ns Op Ar =defn .Op Fl U Ns Ar macro .Op Fl f Ar option +.Op Fl finput-charset= Ns Ar encoding .Op Fl b Ar option .Op Fl l Ar library .Op Fl o Ar outfile @@ -118,7 +119,7 @@ In particular these are .Fl Wpointer-arith , .Fl Wredundant-decls , .Fl Wreturn-type , -.Fl Wshadow , +.Fl Wshadow-local , .Fl Wsign-compare , .Fl Wstrict-prototypes , .Fl Wswitch-enum , @@ -138,16 +139,20 @@ Warn about mixing declarations and statements, which is not allowed prior to C99 .It Fl Wdiv-by-zero Warn about compile-time integer division by zero. .It Fl Wempty-statement -Warn about empty statements, i.e. statements which only consist of a single ';'. +Warn about empty statements, i.e. statements which only consist of a single +.Sq \&; . 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 +(Alias +.Fl W Ns ) Activate some more warnings. In particular these are .Fl Wempty-statement , +.Fl Wshadow , .Fl Wunused-parameter , .Fl Wunused-value . .It Fl Wfatal-errors @@ -165,29 +170,48 @@ Warn about declarations whose declaration specifiers do not include a type speci .It Fl Winit-self Warn about uninitialized variables which are initialized with themselves. .It Fl Wlong-long -Warn if the type 'long long' is used. +Warn if the type +.Sq long long +is used. .It Fl Wmain -Warn if the type of 'main' is suspicious, i.e. if it is not a non-static function declared as either int\ main(void), int\ main(int,\ char**) or, as an extension, int\ main(int,\ char**,\ char**). +Warn if the type of +.Sq main +is suspicious, i.e. if it is not a non-static function declared as either int\ main(void), int\ main(int,\ char**) or, as an extension, int\ main(int,\ char**,\ char**). .It Fl Wmissing-declarations Warn if a non-static function or a global variable without a storage class is defined without a prior declaration. This is typically a sign of a missing #include or that the object should be static. .It Fl Wmissing-noreturn -Warn about functions, which are candidates for the attribute 'noreturn'. +Warn about functions, which are candidates for the attribute +.Sq noreturn . .It Fl Wmissing-prototypes Warn if a global function is defined without a previous prototype declaration. .It Fl Wmultichar -Warn if a multicharacter constant ('FOOF') is used. +Warn if a multicharacter constant +.Pf ( Sq FOOF ) +is used. .It Fl Wnested-externs -Warn if an 'extern' declaration is encountered within a function. +Warn if an +.Sq extern +declaration is encountered within a function. .It Fl Wparentheses Warn if parentheses are omitted in certain contexts. Warn if an assignment is used as condition, e.g. if\ (x\ =\ 23). Warn if && without parentheses is used within ||, e.g. if\ (x\ ||\ y\ &&\ z). -Warn if it there may be confusion which 'if'-statement an 'else'-branch belongs to, e.g. if\ (x)\ if\ (y)\ {}\ else\ {}. +Warn if it there may be confusion which +.Sq if Ns +-statement an +.Sq else Ns +-branch belongs to, e.g. if\ (x)\ if\ (y)\ {}\ else\ {}. Warn if cascaded comparisons appear which do not have their mathematical meaning, e.g. if\ (23\ <=\ x\ <\ 42). Warn if + or - is used as operand of << or >>, e.g. x\ +\ y\ <<\ z. .It Fl Wredundant-decls 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 @@ -228,6 +252,48 @@ Set a frontend or optimizer option. Use .Fl fhelp to get a list of supported optimizer options. +.It Fl finput-charset= Ns Ar encoding +Select the encoding of the input. +Supported values are +.Cm ISO_8859-1:1987 +(aliases +.Cm CP819 , +.Cm IBM819 , +.Cm ISO-8859-1 , +.Cm ISO8859-1 , +.Cm ISO_8859-1 , +.Cm csISOLatin1 , +.Cm iso-ir-100 , +.Cm l1 +and +.Cm latin1 Ns +), +.Cm ISO-8859-15 +(aliases +.Cm ISO8859-15 , +.Cm ISO_8859-15 +and +.Cm Latin-9 Ns +), +.Cm windows-1252 +(alias +.Cm cp1252 Ns +) 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 +to have the same range, representation and behaviour as +.Sq signed char . +.It Fl funsigned-char +Define +.Sq char +to have the same range, representation and behaviour as +.Sq unsigned char . .It Fl b Ar option Set a backend option. Use