parse.y (unary_expr): Give a pedwarn if someone tries to use the &&label GNU extension.
authorBrendan Kehoe <brendan@lisa.cygnus.com>
Wed, 15 Oct 1997 01:26:06 +0000 (01:26 +0000)
committerBrendan Kehoe <brendan@gcc.gnu.org>
Wed, 15 Oct 1997 01:26:06 +0000 (21:26 -0400)
* parse.y (unary_expr): Give a pedwarn if someone tries to use the
&&label GNU extension.

From-SVN: r15907

gcc/cp/ChangeLog
gcc/cp/parse.y

index d5e98a5..a8218ba 100644 (file)
@@ -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,
index dfc59ae..0906947 100644 (file)
@@ -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