mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-26 21:11:30 +08:00
vec.h (VEC_BASE): If base is at offset 0 in the structure, use &(P)->base even if P is NULL.
* vec.h (VEC_BASE): If base is at offset 0 in the structure, use &(P)->base even if P is NULL. From-SVN: r181258
This commit is contained in:
parent
03989f5595
commit
c8bf99b4e8
@ -1,5 +1,8 @@
|
|||||||
2011-11-10 Jakub Jelinek <jakub@redhat.com>
|
2011-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* vec.h (VEC_BASE): If base is at offset 0 in the structure,
|
||||||
|
use &(P)->base even if P is NULL.
|
||||||
|
|
||||||
PR rtl-optimization/51023
|
PR rtl-optimization/51023
|
||||||
* combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
|
* combine.c (simplify_comparison) <case SIGN_EXTEND>: Don't use
|
||||||
val_signbit_known_clear_p for signed comparison narrowing
|
val_signbit_known_clear_p for signed comparison narrowing
|
||||||
|
@ -549,7 +549,12 @@ typedef struct VEC(T,A) \
|
|||||||
} VEC(T,A)
|
} VEC(T,A)
|
||||||
|
|
||||||
/* Convert to base type. */
|
/* Convert to base type. */
|
||||||
|
#if GCC_VERSION >= 4000
|
||||||
|
#define VEC_BASE(P) \
|
||||||
|
((offsetof (__typeof (*P), base) == 0 || (P)) ? &(P)->base : 0)
|
||||||
|
#else
|
||||||
#define VEC_BASE(P) ((P) ? &(P)->base : 0)
|
#define VEC_BASE(P) ((P) ? &(P)->base : 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Vector of integer-like object. */
|
/* Vector of integer-like object. */
|
||||||
#define DEF_VEC_I(T) \
|
#define DEF_VEC_I(T) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user