diff options
author | DJ Delorie <dj@gcc.gnu.org> | 2011-10-21 21:35:29 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2011-10-21 21:35:29 -0400 |
commit | 40c4cbcd82d343e9c9c6b9e1bd7ba8ab04e9220d (patch) | |
tree | 9a220a1521636f19743599c3ac312bb94cc39c8d /include | |
parent | 799ae3ed416181efd294605916715628f62766ad (diff) | |
download | gcc-40c4cbcd82d343e9c9c6b9e1bd7ba8ab04e9220d.zip gcc-40c4cbcd82d343e9c9c6b9e1bd7ba8ab04e9220d.tar.gz gcc-40c4cbcd82d343e9c9c6b9e1bd7ba8ab04e9220d.tar.bz2 |
obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* obstack.h [!GNUC] (obstack_free): Avoid cast to int.
* ansidecl.h (ENUM_BITFIELD): Always use enum in C++
From-SVN: r180321
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 8 | ||||
-rw-r--r-- | include/ansidecl.h | 6 | ||||
-rw-r--r-- | include/obstack.h | 6 |
3 files changed, 15 insertions, 5 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index 342ae36..d5701f40 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -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-09-28 Doug Evans <dje@google.com> * timeval-utils.h: New file. diff --git a/include/ansidecl.h b/include/ansidecl.h index c39ce2f..23d85bf 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -416,10 +416,12 @@ So instead we use the macro below and test it against specific values. */ #define EXPORTED_CONST const #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. */ -#if (GCC_VERSION > 2000) +#ifdef __cplusplus +#define ENUM_BITFIELD(TYPE) enum TYPE +#elif (GCC_VERSION > 2000) #define ENUM_BITFIELD(TYPE) __extension__ enum TYPE #else #define ENUM_BITFIELD(TYPE) unsigned int diff --git a/include/obstack.h b/include/obstack.h index 4aec3a4..23487ba 100644 --- a/include/obstack.h +++ b/include/obstack.h @@ -532,9 +532,9 @@ __extension__ \ # define obstack_free(h,obj) \ ( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ - ? (int) ((h)->next_free = (h)->object_base \ - = (h)->temp + (char *) (h)->chunk) \ - : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) + ? (((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk), 0) \ + : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0))) #endif /* not __GNUC__ or not __STDC__ */ |