* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
This commit is contained in:
parent
2954ce4ce4
commit
006d5c8857
@ -1,3 +1,11 @@
|
|||||||
|
2011-10-21 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
|
* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
|
||||||
|
|
||||||
|
2011-10-21 Marc Glisse <marc.glisse@inria.fr>
|
||||||
|
|
||||||
|
* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
|
||||||
|
|
||||||
2011-10-19 Alan Modra <amodra@gmail.com>
|
2011-10-19 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR ld/13254
|
PR ld/13254
|
||||||
|
@ -416,10 +416,12 @@ So instead we use the macro below and test it against specific values. */
|
|||||||
#define EXPORTED_CONST const
|
#define EXPORTED_CONST const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Be conservative and only use enum bitfields with GCC.
|
/* Be conservative and only use enum bitfields with C++ or GCC.
|
||||||
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
FIXME: provide a complete autoconf test for buggy enum bitfields. */
|
||||||
|
|
||||||
#if (GCC_VERSION > 2000)
|
#ifdef __cplusplus
|
||||||
|
#define ENUM_BITFIELD(TYPE) enum TYPE
|
||||||
|
#elif (GCC_VERSION > 2000)
|
||||||
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
|
#define ENUM_BITFIELD(TYPE) __extension__ enum TYPE
|
||||||
#else
|
#else
|
||||||
#define ENUM_BITFIELD(TYPE) unsigned int
|
#define ENUM_BITFIELD(TYPE) unsigned int
|
||||||
|
@ -532,9 +532,9 @@ __extension__ \
|
|||||||
# define obstack_free(h,obj) \
|
# define obstack_free(h,obj) \
|
||||||
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
|
||||||
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
|
||||||
? (int) ((h)->next_free = (h)->object_base \
|
? (((h)->next_free = (h)->object_base \
|
||||||
= (h)->temp + (char *) (h)->chunk) \
|
= (h)->temp + (char *) (h)->chunk), 0) \
|
||||||
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
|
: ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0)))
|
||||||
|
|
||||||
#endif /* not __GNUC__ or not __STDC__ */
|
#endif /* not __GNUC__ or not __STDC__ */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user