Hi Matthew,
> [ As mentioned in the commit message, the test was done with GCC 8.2.0
> since there was an unrelated problem compiling some sanitizer component
> at the time. I will try to test a current GCC version during the weekend. ]
The compilation problem, more specifically, is
In file included from
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:20:
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:72:
error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned int’ [-Wnarrowing]
339 | typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
| ^
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30:
note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
| ^~~~~~~~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:71:1:
note: in expansion of macro ‘COMPILER_CHECK’
71 | COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
| ^~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:72:
warning: size of array is not an integral constant-expression [-Wpedantic]
339 | typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
| ^
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30:
note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
| ^~~~~~~~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:71:1:
note: in expansion of macro ‘COMPILER_CHECK’
71 | COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
| ^~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:72:
error: size of array ‘assertion_failed__71’ is negative
339 | typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
| ^
../../../../libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30:
note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
| ^~~~~~~~~~~~~~~~~~~~
../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:71:1:
note: in expansion of macro ‘COMPILER_CHECK’
71 | COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
| ^~~~~~~~~~~~~~
on commit a1054504a5da (origin/trunk as of now). The host is ppc64le with
gcc-7.3.0 (Gentoo 7.3.0-r3 p1.4) and the target is mipsr5900el-unknown-
linux-gnu.
Fredrik