Commit 2112475b authored by Jens Gustedt's avatar Jens Gustedt
Browse files

Merge branch 'intel-fix'

parents 0644615f 0981a7e0
......@@ -45,7 +45,7 @@ p99_extension ({
#define p00_sync_lock_release_(OBJ, ORD, ...) \
p99_extension ({ \
P99_MACRO_PVAR(p00_obj, (OBJ)); \
P99_MACRO_PVAR(p00_obj, (OBJ), volatile); \
/* __sync_lock_release only has release consistency */ \
/* the fence must come before so nothing can be reordered after */ \
switch (ORD) { \
......@@ -60,7 +60,7 @@ p99_extension ({ \
#define p00_sync_lock_test_and_set_(OBJ, ORD, ...) \
p99_extension ({ \
P99_MACRO_PVAR(p00_obj, (OBJ)); \
P99_MACRO_PVAR(p00_obj, (OBJ), volatile); \
/* __sync_lock_test_and_set only has acquire consistency */ \
int ret = __sync_lock_test_and_set(p00_obj, 1); \
/* the fence must come after so nothing can be reordered before */ \
......
......@@ -391,7 +391,7 @@ signed p00_trailing_comma_in_initializer__(void) {
#endif
#if P99_COMPILER & P99_COMPILER_INTEL
# define p99_inline __attribute__((__always_inline__)) inline
# define p99_inline __attribute__((__weak__,__always_inline__))
# if __INTEL_COMPILER < 1310
# if defined(__GNUC__) && defined(p00_has_feature_tgmath_h)
# undef p00_has_feature_tgmath_h
......@@ -552,11 +552,6 @@ signed p00_trailing_comma_in_initializer__(void) {
**/
# define P99_WEAK(...) P99_IF_LT(P99_NARG(__VA_ARGS__), 2)(P00_WEAK1(__VA_ARGS__))(P00_WEAK2(__VA_ARGS__))
#if P99_COMPILER_INTEL
# define P99_TENTATIVE_CAUTION 1
#endif
#ifndef P99_TENTATIVE_CAUTION
# define P00_TENTATIVE_DEC(NAME) static
# define P00_TENTATIVE_DEF(NAME) static
......
......@@ -169,7 +169,7 @@ P00_DOCUMENT_PERMITTED_ARGUMENT(P99_JOIN, 2)
P00_DOCUMENT_MULTIPLE_ARGUMENT(P99_STRDUP, 0)
P00_DOCUMENT_MULTIPLE_ARGUMENT(P99_STRDUP, 1)
P00_DOCUMENT_MULTIPLE_ARGUMENT(P99_STRDUP, 2)
#define P99_STRDUP(...) P99_STRCATS(memset(malloc(P99_STRLENS(__VA_ARGS__) + 1), 0, 1), __VA_ARGS__)
#define P99_STRDUP(...) P99_STRCATS(calloc(P99_STRLENS(__VA_ARGS__) + 16, 1), __VA_ARGS__)
/**
** @brief Produce a list of length @a N that has the contents of 0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment