merge from gcc
This commit is contained in:
parent
80cb56ee7a
commit
bf8db3d48e
2 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2003-03-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
|
||||||
|
ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
|
||||||
|
ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
|
||||||
|
ATTRIBUTE_NULL_PRINTF_5): New.
|
||||||
|
(ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.
|
||||||
|
|
||||||
2003-03-17 Jan Hubicka <jh@suse.cz>
|
2003-03-17 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
||||||
* hashtab.h (htab_traverse_noresize): Declare.
|
* hashtab.h (htab_traverse_noresize): Declare.
|
||||||
|
|
|
@ -268,8 +268,21 @@ So instead we use the macro below and test it against specific values. */
|
||||||
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||||
#endif /* ATTRIBUTE_NORETURN */
|
#endif /* ATTRIBUTE_NORETURN */
|
||||||
|
|
||||||
|
/* Attribute `nonnull' was valid as of gcc 3.3. */
|
||||||
|
#ifndef ATTRIBUTE_NONNULL
|
||||||
|
# if (GCC_VERSION >= 3003)
|
||||||
|
# define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m)))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_NONNULL(m)
|
||||||
|
# endif /* GNUC >= 3.3 */
|
||||||
|
#endif /* ATTRIBUTE_NONNULL */
|
||||||
|
|
||||||
|
/* Use ATTRIBUTE_PRINTF when the format specifier must not be NULL.
|
||||||
|
This was the case for the `printf' format attribute by itself
|
||||||
|
before GCC 3.3, but as of 3.3 we need to add the `nonnull'
|
||||||
|
attribute to retain this behavior. */
|
||||||
#ifndef ATTRIBUTE_PRINTF
|
#ifndef ATTRIBUTE_PRINTF
|
||||||
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) ATTRIBUTE_NONNULL(m)
|
||||||
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
|
||||||
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
|
||||||
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
|
||||||
|
@ -277,6 +290,21 @@ So instead we use the macro below and test it against specific values. */
|
||||||
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
|
||||||
#endif /* ATTRIBUTE_PRINTF */
|
#endif /* ATTRIBUTE_PRINTF */
|
||||||
|
|
||||||
|
/* Use ATTRIBUTE_NULL_PRINTF when the format specifier may be NULL. A
|
||||||
|
NULL format specifier was allowed as of gcc 3.3. */
|
||||||
|
#ifndef ATTRIBUTE_NULL_PRINTF
|
||||||
|
# if (GCC_VERSION >= 3003)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
|
||||||
|
# else
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF(m, n)
|
||||||
|
# endif /* GNUC >= 3.3 */
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_1 ATTRIBUTE_NULL_PRINTF(1, 2)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_2 ATTRIBUTE_NULL_PRINTF(2, 3)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_3 ATTRIBUTE_NULL_PRINTF(3, 4)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_4 ATTRIBUTE_NULL_PRINTF(4, 5)
|
||||||
|
# define ATTRIBUTE_NULL_PRINTF_5 ATTRIBUTE_NULL_PRINTF(5, 6)
|
||||||
|
#endif /* ATTRIBUTE_NULL_PRINTF */
|
||||||
|
|
||||||
/* We use __extension__ in some places to suppress -pedantic warnings
|
/* We use __extension__ in some places to suppress -pedantic warnings
|
||||||
about GCC extensions. This feature didn't work properly before
|
about GCC extensions. This feature didn't work properly before
|
||||||
gcc 2.8. */
|
gcc 2.8. */
|
||||||
|
|
Loading…
Reference in a new issue