mardi 4 septembre 2018

Compiler errors with gcc-8

From the code of llvm-toolchain-6.0: .../sanitizer_internal_defs.h:

#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
#define IMPL_PASTE(a, b) a##b
#define IMPL_COMPILER_ASSERT(pred, line) \
  typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]

.../sanitizer_platform_limits_posix.cc:

COMPILER_CHECK(sizeof(socklen_t) == sizeof(unsigned));

gcc-8 ... -Wpedantic -Werror ...

.../sanitizer_internal_defs.h:321:70: error: size of array ‘assertion_failed__1001’ is negative typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]

                                                                  ^

.../sanitizer_internal_defs.h:315:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’ #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, LINE)

Aucun commentaire:

Enregistrer un commentaire