summaryrefslogtreecommitdiffstats
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-12 20:15:20 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-07-12 20:15:20 +0000
commit3a77db2fe4befc1ba4b1edbf2d69d5dc6503fda1 (patch)
treee7fca6dc3d8c848108c755daa00e7fe40a2c41e3 /gcc/c-parse.in
parentb02cf41a6fb437949e01b330a0aaa9d5c3974819 (diff)
downloadppe42-gcc-3a77db2fe4befc1ba4b1edbf2d69d5dc6503fda1.tar.gz
ppe42-gcc-3a77db2fe4befc1ba4b1edbf2d69d5dc6503fda1.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34997 138bc75d-0d04-0410-961f-82ee72b054a4
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 04e160d02ee..87dfcebc810 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
OpenPOWER on IntegriCloud