aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-07-12 20:15:20 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-07-12 20:15:20 +0000
commit895ea61453c945cced3974a35173dd58c7753758 (patch)
treee7fca6dc3d8c848108c755daa00e7fe40a2c41e3 /gcc/c-parse.in
parent8364301f5a1725e900f4554f5d9358146c804ee3 (diff)
downloadgcc-895ea61453c945cced3974a35173dd58c7753758.zip
gcc-895ea61453c945cced3974a35173dd58c7753758.tar.gz
gcc-895ea61453c945cced3974a35173dd58c7753758.tar.bz2
c-decl.c (define_label): Warn about identifier conflicts with labels in traditional C.
* c-decl.c (define_label): Warn about identifier conflicts with labels in traditional C. * c-parse.in (unop +): Warn about the unary plus operator for traditional C. * c-typeck.c (store_init_value): Warn about automatic aggregate initialization for traditional C. * invoke.texi (-Wtraditional): Document new warnings. From-SVN: r34997
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 04e160d..87dfceb 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -411,7 +411,12 @@ unop: '&'
| '-'
{ $$ = NEGATE_EXPR; }
| '+'
- { $$ = CONVERT_EXPR; }
+ { $$ = CONVERT_EXPR;
+ifc
+ if (warn_traditional)
+ warning ("traditional C rejects the unary plus operator");
+end ifc
+ }
| PLUSPLUS
{ $$ = PREINCREMENT_EXPR; }
| MINUSMINUS