* cpphash.h: Remove conditional #define of __extension__.
* rtl.h: Add __extension__ to RTL_CHECK1, RTL_CHECK2,
RTL_CHECKC1, RTL_CHECKC2, and RTVEC_ELT macros
(ENABLE_RTL_CHECKING only).
* tree.h: Add __extension__ to TREE_CHECK, TREE_CLASS_CHECK,
CST_OR_CONSTRUCTOR_CHECK, and EXPR_CHECK macros
(ENABLE_TREE_CHECKING only).
* varray.h: Add __extension__ to VARRAY_CHECK macro
(ENABLE_CHECKING only).
include:
* ansidecl.h: #define __extension__ to nothing if
GCC_VERSION < 2008.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33733
138bc75d-0d04-0410-961f-
82ee72b054a4
+2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
+
+ * cpphash.h: Remove conditional #define of __extension__.
+ * rtl.h: Add __extension__ to RTL_CHECK1, RTL_CHECK2,
+ RTL_CHECKC1, RTL_CHECKC2, and RTVEC_ELT macros
+ (ENABLE_RTL_CHECKING only).
+ * tree.h: Add __extension__ to TREE_CHECK, TREE_CLASS_CHECK,
+ CST_OR_CONSTRUCTOR_CHECK, and EXPR_CHECK macros
+ (ENABLE_TREE_CHECKING only).
+ * varray.h: Add __extension__ to VARRAY_CHECK macro
+ (ENABLE_CHECKING only).
+
2000-05-06 Richard Earnshaw (reanrsha@arm.com)
Use new tail-calling mechanism on ARM.
typedef unsigned char U_CHAR;
#define U (const U_CHAR *) /* Intended use: U"string" */
-/* gcc 2.7.2 can't handle __extension__ const char array[] = { ... }.
- I don't know when this was added - be conservative, assume it only
- works in 2.95. */
-#if GCC_VERSION < 2095
-#define __extension__
-#endif
-
/* The structure of a node in the hash table. The hash table
has entries for all tokens defined by #define commands (type T_MACRO),
plus some special tokens like __LINE__ (these each have their own
#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
/* The bit with a star outside the statement expr and an & inside is
so that N can be evaluated only once. */
-#define RTL_CHECK1(RTX, N, C1) \
+#define RTL_CHECK1(RTX, N, C1) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; }))
-#define RTL_CHECK2(RTX, N, C1, C2) \
+#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \
if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; }))
-#define RTL_CHECKC1(RTX, N, C) \
+#define RTL_CHECKC1(RTX, N, C) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \
if (GET_CODE (_rtx) != C) \
rtl_check_failed_code1 (_rtx, C, __FILE__, __LINE__, \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; }))
-#define RTL_CHECKC2(RTX, N, C1, C2) \
+#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
(*({ rtx _rtx = (RTX); int _n = (N); \
enum rtx_code _code = GET_CODE (_rtx); \
if (_code != C1 && _code != C2) \
__PRETTY_FUNCTION__); \
&_rtx->fld[_n]; }))
-#define RTVEC_ELT(RTVEC, I) \
+#define RTVEC_ELT(RTVEC, I) __extension__ \
(*({ rtvec _rtvec = (RTVEC); int _i = (I); \
if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \
rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \
is accessed incorrectly. The macros abort with a fatal error. */
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
-#define TREE_CHECK(t, code) \
+#define TREE_CHECK(t, code) __extension__ \
({ const tree __t = t; \
if (TREE_CODE(__t) != (code)) \
tree_check_failed (__t, code, __FILE__, \
__LINE__, __PRETTY_FUNCTION__); \
__t; })
-#define TREE_CLASS_CHECK(t, class) \
+#define TREE_CLASS_CHECK(t, class) __extension__ \
({ const tree __t = t; \
if (TREE_CODE_CLASS(TREE_CODE(__t)) != (class)) \
tree_class_check_failed (__t, class, __FILE__, \
__t; })
/* These checks have to be special cased. */
-#define CST_OR_CONSTRUCTOR_CHECK(t) \
+#define CST_OR_CONSTRUCTOR_CHECK(t) __extension__ \
({ const tree __t = t; \
enum tree_code __c = TREE_CODE(__t); \
if (__c != CONSTRUCTOR && TREE_CODE_CLASS(__c) != 'c') \
tree_check_failed (__t, CONSTRUCTOR, __FILE__, \
__LINE__, __PRETTY_FUNCTION__); \
__t; })
-#define EXPR_CHECK(t) \
+#define EXPR_CHECK(t) __extension__ \
({ const tree __t = t; \
char __c = TREE_CODE_CLASS(TREE_CODE(__t)); \
if (__c != 'r' && __c != 's' && __c != '<' \
extern void varray_check_failed PARAMS ((varray_type, size_t,
const char *, int,
const char *)) ATTRIBUTE_NORETURN;
-#define VARRAY_CHECK(VA, N, T) \
+#define VARRAY_CHECK(VA, N, T) __extension__ \
(*({ varray_type _va = VA; \
size_t _n = N; \
if (_n >= _va->num_elements) \
+2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
+
+ * ansidecl.h: #define __extension__ to nothing if
+ GCC_VERSION < 2008.
+
2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* demangle.h (demangler_engine): Constify.
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
#endif /* ATTRIBUTE_PRINTF */
+/* We use __extension__ in some places to suppress -pedantic warnings
+ about GCC extensions. This feature didn't work properly before
+ gcc 2.8. */
+#if GCC_VERSION < 2008
+#define __extension__
+#endif
+
#endif /* ansidecl.h */