diff options
author | Brendan Kehoe <brendan@lisa.cygnus.com> | 1997-10-15 01:26:06 +0000 |
---|---|---|
committer | Brendan Kehoe <brendan@gcc.gnu.org> | 1997-10-14 21:26:06 -0400 |
commit | 32066e1ae2268497e5c1758056962932d3dac7b9 (patch) | |
tree | d61ddaddd96063a8d34ddc1a09ecf9499ee05c93 | |
parent | 6640eba99bb8bec461818bb21ef17aec5bee5252 (diff) | |
download | gcc-32066e1ae2268497e5c1758056962932d3dac7b9.zip gcc-32066e1ae2268497e5c1758056962932d3dac7b9.tar.gz gcc-32066e1ae2268497e5c1758056962932d3dac7b9.tar.bz2 |
parse.y (unary_expr): Give a pedwarn if someone tries to use the &&label GNU extension.
* parse.y (unary_expr): Give a pedwarn if someone tries to use the
&&label GNU extension.
From-SVN: r15907
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parse.y | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d5e98a5..a8218ba1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com> + + * parse.y (unary_expr): Give a pedwarn if someone tries to use the + &&label GNU extension. + Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net> * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index dfc59ae..0906947 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -1088,6 +1088,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 == NULL_TREE) $$ = null_pointer_node; else |