X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=include%2Fansidecl.h;h=2eeccf203514e6d11a8979fdaeba308837cbea18;hb=da498675b32cacfed666048d5795bddd521a20a2;hp=4b3eae9d8870c39bbdac54e1d371a98e39461865;hpb=6ca10ffb30e14afa429439f2f5a9ea16a86da78c;p=pf3gnuchains%2Fgcc-fork.git diff --git a/include/ansidecl.h b/include/ansidecl.h index 4b3eae9d887..2eeccf20351 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -149,7 +149,12 @@ So instead we use the macro below and test it against specific values. */ #define PTRCONST void *const #define LONG_DOUBLE long double +/* PARAMS is often defined elsewhere (e.g. by libintl.h), so wrap it in + a #ifndef. */ +#ifndef PARAMS #define PARAMS(ARGS) ARGS +#endif + #define VPARAMS(ARGS) ARGS #define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR) @@ -264,6 +269,14 @@ So instead we use the macro below and test it against specific values. */ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif /* ATTRIBUTE_UNUSED */ +/* Before GCC 3.4, the C++ frontend couldn't parse attributes placed after the + identifier name. */ +#if ! defined(__cplusplus) || (GCC_VERSION >= 3004) +# define ARG_UNUSED(NAME) NAME ATTRIBUTE_UNUSED +#else /* !__cplusplus || GNUC >= 3.4 */ +# define ARG_UNUSED(NAME) NAME +#endif /* !__cplusplus || GNUC >= 3.4 */ + #ifndef ATTRIBUTE_NORETURN #define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) #endif /* ATTRIBUTE_NORETURN */ @@ -314,6 +327,15 @@ So instead we use the macro below and test it against specific values. */ # define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6) #endif /* ATTRIBUTE_NULL_PRINTF */ +/* Attribute `sentinel' was valid as of gcc 3.5. */ +#ifndef ATTRIBUTE_SENTINEL +# if (GCC_VERSION >= 3005) +# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__)) +# else +# define ATTRIBUTE_SENTINEL +# endif /* GNUC >= 3.5 */ +#endif /* ATTRIBUTE_SENTINEL */ + /* We use __extension__ in some places to suppress -pedantic warnings about GCC extensions. This feature didn't work properly before gcc 2.8. */