From 32066e1ae2268497e5c1758056962932d3dac7b9 Mon Sep 17 00:00:00 2001 From: Brendan Kehoe Date: Wed, 15 Oct 1997 01:26:06 +0000 Subject: [PATCH] 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 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/parse.y | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d5e98a59f04..a8218ba1f92 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1997-10-14 Brendan Kehoe + + * 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 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it, diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index dfc59aeb771..0906947b731 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 -- 2.30.2