X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=include%2Fobstack.h;h=0d8746f835b1f14401d725fd5c3362af5c46488d;hb=689580daaaa2fcbd641faf9abb7da6e8b7a48f6e;hp=0ff33098443053aefb98518ca367d1f217f069ec;hpb=314dee8ea9be79a450d9f0b451619b67ebe0e017;p=binutils-gdb.git diff --git a/include/obstack.h b/include/obstack.h index 0ff33098443..0d8746f835b 100644 --- a/include/obstack.h +++ b/include/obstack.h @@ -1,5 +1,5 @@ /* obstack.h - object stack macros - Copyright (C) 1988-2015 Free Software Foundation, Inc. + Copyright (C) 1988-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -137,12 +137,16 @@ relative to B. Otherwise, use the faster strategy of computing the alignment relative to 0. */ -#define __PTR_ALIGN(B, P, A) \ - __BPTR_ALIGN (sizeof (ptrdiff_t) < sizeof (void *) ? (B) : (char *) 0, \ - P, A) +#define __PTR_ALIGN(B, P, A) \ + (sizeof (ptrdiff_t) < sizeof (void *) ? __BPTR_ALIGN (B, P, A) \ + : (char *) (((ptrdiff_t) (P) + (A)) & ~(A))) #ifndef __attribute_pure__ -# define __attribute_pure__ _GL_ATTRIBUTE_PURE +# if defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2096 +# define __attribute_pure__ __attribute__ ((__pure__)) +# else +# define __attribute_pure__ +# endif #endif #ifdef __cplusplus