summaryrefslogtreecommitdiffhomepage
path: root/cparser.1
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-05-01 22:37:36 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2016-05-01 22:50:18 +0200
commit664fa9e8e06c8da05d9cd8069882fca1096eabff (patch)
tree7154d6abdf22eaa511f9838a4a23dcbff0920f47 /cparser.1
parent97aa744ddac052e22ff2caffd0d05d755f27f621 (diff)
Split '-Wparentheses' into 'Wparentheses-assignment', 'Wparentheses-comparison', 'Wparentheses-else', 'Wparentheses-logical' and 'Wparentheses-shift'.
Diffstat (limited to 'cparser.1')
-rw-r--r--cparser.123
1 files changed, 19 insertions, 4 deletions
diff --git a/cparser.1 b/cparser.1
index f0b1146..93964e0 100644
--- a/cparser.1
+++ b/cparser.1
@@ -170,7 +170,11 @@ In particular these are
.Fl Winit-self ,
.Fl Wmain ,
.Fl Wnonnull ,
-.Fl Wparentheses ,
+.Fl Wparentheses-assignment ,
+.Fl Wparentheses-comparison ,
+.Fl Wparentheses-else ,
+.Fl Wparentheses-logical ,
+.Fl Wparentheses-shift ,
.Fl Wpointer-arith ,
.Fl Wredundant-decls ,
.Fl Wreturn-type ,
@@ -246,12 +250,23 @@ Warn if an
.Sq extern
declaration is encountered within a function.
.It Fl Wparentheses
-Warn if parentheses are omitted in certain contexts.
+Warn if parentheses or braces are omitted in certain contexts.
+.No Activate Fl Wparentheses-assignment , Wparentheses-comparison , Wparentheses-else , Wparentheses-logical , Wparentheses-shift .
+.It Fl Wparentheses-assignment
.No Warn if an assignment is used as condition, e.g. Sq if\ (x\ =\ 23) .
-.No Warn if So && Sc without parentheses is used within So || Sc , e.g. Sq if\ (x\ ||\ y\ &&\ z) .
-.No Warn if it there may be confusion which So if Sc Ns -statement an So else Sc Ns -branch belongs to, e.g. Sq if\ (x)\ if\ (y)\ {}\ else\ {} .
+Default is off.
+.It Fl Wparentheses-comparison
.No Warn if cascaded comparisons appear which do not have their mathematical meaning, e.g. Sq if\ (23\ <=\ x\ <\ 42) .
+Default is off.
+.It Fl Wparentheses-else
+.No Warn if it there may be confusion which So if Sc Ns -statement an So else Sc Ns -branch belongs to, e.g. Sq if\ (x)\ if\ (y)\ {}\ else\ {} .
+Default is off.
+.It Fl Wparentheses-logical
+.No Warn if So && Sc without parentheses is used within So || Sc , e.g. Sq if\ (x\ ||\ y\ &&\ z) .
+Default is off.
+.It Fl Wparentheses-shift
.No Warn if So + Sc or So - Sc is used as operand of So << Sc or So >> Sc , Sq e.g. x\ +\ y\ <<\ z .
+Default is off.
.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 Wreturn-local-addr