From 49b6b48b990e55f2eef0fa5dcc9eb0b16fa92826 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 5 Jan 2003 00:48:16 +0000 Subject: [PATCH] (yyerrlab1): Omit attribute if __cplusplus is defined, since GNU C++ (as of 3.2.1) does not allow attributes on labels. Problem reported by Nelson H. F. Beebe. --- data/yacc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/yacc.c b/data/yacc.c index 2b7a4a3a..dc2d58d6 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -1115,7 +1115,10 @@ yyerrlab1: invokes YYERROR. MacOS 10.2.3's buggy "smart preprocessor" insists on the trailing semicolon. */ #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) + /* GNU C++ (as of version 3.2.1) does not allow attributes on labels. */ +# ifndef __cplusplus __attribute__ ((__unused__)); +# endif #endif ]b4_location_if([ yylerrsp = yylsp; -- 2.45.2