[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GLR patch for non-GCC compilers
From: |
Paul Eggert |
Subject: |
GLR patch for non-GCC compilers |
Date: |
Sun, 24 Jul 2005 21:23:22 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
I installed this to fix a problem when attempting to use a GLR parser
with non-GCC compilers. (Apparently I was the first person to test
Bison CVS with a non-GCC compiler since June 6!)
2005-07-24 Paul Eggert <address@hidden>
* data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
version of GCC, since the macro is used with non-GCC compilers.
--- glr.c 24 Jul 2005 07:17:06 -0000 1.110
+++ glr.c 25 Jul 2005 04:20:39 -0000 1.111
@@ -261,18 +261,18 @@ b4_syncline(address@hidden@], address@hidden@])
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
-# if !defined (__GNUC__) || __GNUC__ < 2 || \
-(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+# if (!defined (__GNUC__) || __GNUC__ < 2 \
+ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__)
# define __attribute__(Spec) /* empty */
-# else
-]b4_location_if([# define YYOPTIONAL_LOC(Name) Name],[
-# if defined (__cplusplus)
-# define YYOPTIONAL_LOC(Name) /* empty */
-# else
-# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
-# endif])[
# endif
#endif
+
+]b4_location_if([#define YYOPTIONAL_LOC(Name) Name],[
+#ifdef __cplusplus
+# define YYOPTIONAL_LOC(Name) /* empty */
+#else
+# define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
+#endif])[
#ifndef YYASSERT
# define YYASSERT(condition) ((void) ((condition) || (abort (), 0)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GLR patch for non-GCC compilers,
Paul Eggert <=