don't use arg-ful constructor attribute for early nallocx test

101 is not very early anyways and arg-ful constructor attribute is
only supported since gcc 4.3 (and e.g. rhel 5's compiler fails to
compile it). So there seems to be very little value trying to ask for
priority of 101.
This commit is contained in:
Aliaksey Kandratsenka 2017-05-21 22:22:21 -07:00
parent 5346b8a4de
commit 07a124d8c1

View File

@ -1079,14 +1079,7 @@ struct GlobalNallocx {
#if defined(__GNUC__)
#if defined(__APPLE__)
// llvm-gcc on older osex that I have access to, doesn't like arg-ful
// constructor attribute.
static void check_global_nallocx() __attribute__((constructor));
#else
// 101 is the max user priority.
static void check_global_nallocx() __attribute__((constructor(101)));
#endif
static void check_global_nallocx() { CHECK_GT(nallocx(99, 0), 99); }
#endif // __GNUC__