drop local workarounds for gcc 4.2
This commit is contained in:
parent
3f2636fe13
commit
af0d139433
@ -12,22 +12,13 @@
|
||||
/* Already C11 */
|
||||
#else
|
||||
|
||||
#ifndef __has_extension
|
||||
#define __has_extension(x) 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* C11 static_assert() macro
|
||||
* assert.h only defines that name for C11 and above
|
||||
*/
|
||||
#ifndef static_assert
|
||||
#if defined(__clang__) && __has_extension(c_static_assert)
|
||||
#define static_assert _Static_assert
|
||||
#elif defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || (__GNUC__ > 4))
|
||||
#define static_assert _Static_assert
|
||||
#else
|
||||
#define static_assert(cond, mesg) struct _C11_COMPAT_H_static_assert_unused
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -912,7 +912,7 @@ public:
|
||||
/* empty */
|
||||
}
|
||||
|
||||
ast_type_specifier(const struct glsl_type *t)
|
||||
ast_type_specifier(const glsl_type *t)
|
||||
: type(t), type_name(t->name), structure(NULL), array_specifier(NULL),
|
||||
default_precision(ast_precision_none)
|
||||
{
|
||||
|
@ -488,7 +488,7 @@ bool ralloc_vasprintf_append(char **str, const char *fmt, va_list args);
|
||||
*
|
||||
* which is more idiomatic in C++ than calling ralloc.
|
||||
*/
|
||||
#define DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(TYPE, ALLOC_FUNC, USE_DESTRUCTOR) \
|
||||
#define DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(TYPE, ALLOC_FUNC) \
|
||||
private: \
|
||||
static void _ralloc_destructor(void *p) \
|
||||
{ \
|
||||
@ -499,7 +499,7 @@ public: \
|
||||
{ \
|
||||
void *p = ALLOC_FUNC(mem_ctx, size); \
|
||||
assert(p != NULL); \
|
||||
if (USE_DESTRUCTOR && !HAS_TRIVIAL_DESTRUCTOR(TYPE)) \
|
||||
if (!HAS_TRIVIAL_DESTRUCTOR(TYPE)) \
|
||||
ralloc_set_destructor(p, _ralloc_destructor); \
|
||||
return p; \
|
||||
} \
|
||||
@ -516,16 +516,16 @@ public: \
|
||||
}
|
||||
|
||||
#define DECLARE_RALLOC_CXX_OPERATORS(type) \
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, ralloc_size, true)
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, ralloc_size)
|
||||
|
||||
#define DECLARE_RZALLOC_CXX_OPERATORS(type) \
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, rzalloc_size, true)
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, rzalloc_size)
|
||||
|
||||
#define DECLARE_LINEAR_ALLOC_CXX_OPERATORS(type) \
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, linear_alloc_child, false)
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, linear_alloc_child)
|
||||
|
||||
#define DECLARE_LINEAR_ZALLOC_CXX_OPERATORS(type) \
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, linear_zalloc_child, false)
|
||||
DECLARE_ALLOC_CXX_OPERATORS_TEMPLATE(type, linear_zalloc_child)
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user