summaryrefslogtreecommitdiff
path: root/gcc/c-parse.in
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-01-14 01:15:11 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-01-14 01:15:11 +0000
commitf4a46b94ebe86f07951ee05da41fb58d645ceb28 (patch)
tree2923b407ccc3e2d9ec360358d32c265875c1b0e7 /gcc/c-parse.in
parentaa5ec236cf31ff5a76ef0440a181a8036a849017 (diff)
downloadgcc-f4a46b94ebe86f07951ee05da41fb58d645ceb28.tar.gz
(unary_expr): If -pedantic, give error for &&.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r--gcc/c-parse.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 0862d30a065..bbd565d7149 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -1,5 +1,5 @@
/* YACC parser for C syntax and for Objective C. -*-c-*-
- Copyright (C) 1987, 88, 89, 92, 93, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -408,6 +408,8 @@ unary_expr:
/* Refer to the address of a label as a pointer. */
| ANDAND identifier
{ tree label = lookup_label ($2);
+ if (pedantic)
+ pedwarn ("ANSI C forbids `&&'");
if (label == 0)
$$ = null_pointer_node;
else