From: Paul Eggert Date: Sun, 25 May 2003 06:44:08 +0000 (+0000) Subject: (union yyalloc): Do not evaluate X-Git-Tag: BISON-2_0~299 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/d7aa6ec1799a6b6a281ffdbe59f952a84b97c327?hp=f54526254746d9a19dacd9d1c0cac798776501d2 (union yyalloc): Do not evaluate YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined. This fixes a problem reported by John Bowman when the Compaq/HP Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM -ansi -Wall -gall). (YYCOPY): Do not evaluate __GNUC__ unless it is defined. --- diff --git a/data/yacc.c b/data/yacc.c index 4ee09fbb..359a9002 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -248,7 +248,8 @@ b4_syncline([@oline@], [@ofile@])[ #if (! defined (yyoverflow) \ && (! defined (__cplusplus) \ - || (]b4_location_if([YYLTYPE_IS_TRIVIAL && ])[YYSTYPE_IS_TRIVIAL))) + || (]b4_location_if([[defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \ + && ]])[defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -275,7 +276,7 @@ union yyalloc /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if 1 < __GNUC__ +# if defined (__GNUC__) && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else