Age | Commit message (Collapse) | Author | Files | Lines |
|
So it does not clash with global definition.
|
|
The test-as-const-tlsdesc uses _Static_assert to verify the constants
generated and clang warns the expression is not an integral constant
expression because the cast performs a conversion (and it is no
allowed).
|
|
|
|
|
|
It is used on tests as well.
|
|
clang warns that the instatiation of the variable is required,
but no definition is available. They are implemented on
tst-unique4lib.so.
Checked on x86_64-linux-gnu.
|
|
clang warns that the instatiation of the variable is required,
but no definition is available. They are implemented on
tst-unique3lib.so.
Checked on x86_64-linux-gnu.
|
|
clang warns that converting from TIME_T_MAX to double (upper_bound)
loses precision (from 9223372036854775807 to 9223372036854775808):
tst-timespec.c:290:19: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
.upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
^~~~~~~~~~
tst-timespec.c:48:20: note: expanded from macro 'TIME_T_MAX'
#define TIME_T_MAX TYPE_MAXIMUM (time_t)
^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It does not matter for the test.
Checked on x86_64-linux-gnu.
|
|
clang warns on some atomic macros, disable for now:
tst-atomic.c:463:7: error: unsupported inline asm: input with type
'int64_t' (aka 'long') matching output with type 'typeof (*&mem)' (aka
'int')
if (catomic_exchange_and_add (&mem, 11) != 2
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro
'catomic_exchange_and_add'
__arch_exchange_and_add_body (__arch_exchange_and_add_cprefix,
__arch_c, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro
'__arch_exchange_and_add_body'
: "0" ((int64_t) cast_to_integer (__addval)),
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-atomic.c:487:7: error: unsupported inline asm: input with type
'int64_t' (aka 'long') matching output with type 'typeof (*(&mem))' (aka
'int')
if (catomic_increment_val (&mem) != 3)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/atomic.h:313:38: note: expanded from macro
'catomic_increment_val'
# define catomic_increment_val(mem) (catomic_exchange_and_add ((mem), 1)
+ 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro
'catomic_exchange_and_add'
__arch_exchange_and_add_body (__arch_exchange_and_add_cprefix,
__arch_c, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro
'__arch_exchange_and_add_body'
: "0" ((int64_t) cast_to_integer (__addval)),
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tst-atomic.c:501:7: error: unsupported inline asm: input with type
'int64_t' (aka 'long') matching output with type 'typeof (*(&mem))' (aka
'int')
if (catomic_decrement_val (&mem) != 15)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/atomic.h:340:38: note: expanded from macro
'catomic_decrement_val'
# define catomic_decrement_val(mem) (catomic_exchange_and_add ((mem),
-1) - 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:213:3: note: expanded from macro
'catomic_exchange_and_add'
__arch_exchange_and_add_body (__arch_exchange_and_add_cprefix,
__arch_c, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86/atomic-machine.h:199:12: note: expanded from macro
'__arch_exchange_and_add_body'
: "0" ((int64_t) cast_to_integer (__addval)),
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
clang complains that adding a 'regoff_t' to a string doe snot
append to it, and the printf idea below is to make rm_so an
offset.
|
|
Clang emits the following warnings:
../sysdeps/unix/sysv/linux/tst-getdents64.c:111:18: error: fields must
have a constant size: 'variable length array in structure' extension
will never be supported
char buffer[buffer_size];
^
|
|
|
|
|
|
|
|
|
|
Clang issues the following warning:
tst-vfprintf-width-i18n.c:51:34: error: invalid conversion specifier '1'
[-Werror,-Wformat-invalid-specifier]
TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16);
~~^
Since it does not how to handle %I.
|
|
Clang issues the following warnings:
tst-unlockedio.c:63:36: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from -0 to 0
[-Werror,-Wliteral-conversion]
|| fwrite_unlocked (blah, 0, -0.0, fp) != 0
~~~~~~~~~~~~~~~ ^~~~
tst-unlockedio.c:61:33: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from 0.25 to 0
[-Werror,-Wliteral-conversion]
|| fwrite_unlocked (--cp, 0.25, 16, fp) != 0
~~~~~~~~~~~~~~~ ^~~~
tst-unlockedio.c:59:37: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from 0.25 to 0
[-Werror,-Wliteral-conversion]
|| fwrite_unlocked (cp++, 16, 0.25, fp) != 0
~~~~~~~~~~~~~~~ ^~~~
tst-unlockedio.c:116:34: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from -0 to 0
[-Werror,-Wliteral-conversion]
|| fread_unlocked (buf, 0, -0.0, fp) != 0
~~~~~~~~~~~~~~ ^~~~
tst-unlockedio.c:114:32: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from 0.25 to 0
[-Werror,-Wliteral-conversion]
|| fread_unlocked (--wp, 0.25, 16, fp) != 0
~~~~~~~~~~~~~~ ^~~~
tst-unlockedio.c:112:36: error: implicit conversion from 'double' to
'size_t' (aka 'unsigned long') changes value from 0.25 to 0
[-Werror,-Wliteral-conversion]
|| fread_unlocked (wp++, 16, 0.25, fp) != 0
~~~~~~~~~~~~~~ ^~~~
|
|
|
|
|
|
|
|
|
|
Compiler might emit a __copysign.
|
|
Clang issues the following warning:
../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:49:2: error:
implicit truncation from 'int' to bit-field changes value from 65535 to
-1 [-Werror,-Wbitfield-constant-conversion]
SET_LDOUBLE_WORDS (ldnx, 0xffff,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro
'SET_LDOUBLE_WORDS'
iw_u.parts.sign_exponent = (exp); \
^ ~~~~~
../sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c:51:2: error:
implicit truncation from 'int' to bit-field changes value from 65535 to
-1 [-Werror,-Wbitfield-constant-conversion]
SET_LDOUBLE_WORDS (ldny, 0xffff,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../sysdeps/x86_64/fpu/math_ldbl.h:56:28: note: expanded from macro
'SET_LDOUBLE_WORDS'
iw_u.parts.sign_exponent = (exp); \
^ ~~~~~
|
|
|
|
|
|
clang ignore the attribute, which is required by libmvec tests.
|
|
clang fails building test-tgmath3-atan2.c:
error: '_Complex __int128' is invalid
_Complex __int128 var__Complex___int128 __attribute__ ((unused));
since it does not support _Complex with __int128. So disable
the test in such case.
|
|
clang issues:
../sysdeps/x86_64/fpu/test-double-vlen4.h:20:2: error: #include_next in
file found relative to primary source file or found by absolute path;
will search from start of include path
[-Werror,-Winclude-next-absolute-path]
Instead of suppress the warning, it is simpler to just include the
absolute path instead.
|
|
|
|
|
|
The type generic fabs expansion issues the floating point absolute with
the wrong argument type (for instance cabs with floating point or fabs
with a complex type) and clang warns that implicit conversion might
incur in unexpected behavior.
|
|
clang warns that since the global variables are only used to function
calls (without being actually used), there are not needed and will
not be emitted.
|
|
clang does not support 'I' specifier and handles it as a 'length
modifier'.
|
|
|
|
clang warns that the alias will be always resolve to
__GI___feupdateenv even if weak definition of __GI_feupdateenv
is overridden, which is really the intention.
|
|
The .cfi_label is a gas extension not supported by clang. From a
ziglang discussion [1], it seems that it is not really required.
[1] https://github.com/ziglang/zig/issues/3340
|
|
clang warns that the alias will be always resolve to __strlen
even if weak definition of __GI_strlen is overridden, which is
really the intention.
|
|
clang binds autogenerated memcpy/memset/memchr calls to the hidden
internal symbols, different than gcc that binds without hidden
attribute. And this triggers an linker issue with bfd:
ld: BFD (GNU Binutils for Ubuntu) 2.38 assertion fail
../../bfd/elf32-arm.c:4286
Similar to other architectures, bind internal memcpy and memcpy
symbols to the generic interface instead.
|
|
clang fails with:
error: invalid instruction
|
|
clang issues:
error: value size does not match register size specified by the
constraint and modifier [-Werror,-Wasm-operand-widths]
while tryng to use 32 bit variables with 'mrs' to get/set the
fpsr, dczid_el0, and ctr. Since all of 64 bit register, use the
expected variable size.
|
|
clang by default rejects the input casts with:
error: invalid use of a cast in a inline asm context requiring an
lvalue: remove the cast or build with -fheinous-gnu-extensions
And even with -fheinous-gnu-extensions clang still throws an warning
and also states that this option might be removed in the future.
For gcc the cast are still useful [1] as type-checking.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581722.html
|
|
clang can not apply asm redirections to functions after these
functions are used for the first time.
|
|
It triggers an ICE with clang while building round_and_return.
|
|
|
|
|
|
Clang supports __builtin_fabsf128 (despite not supporting _Float128) but
it does not support __builtin_fabsq. Fallback to back to
`typedef __float128 _Float128;` it clang is used.
|
|
|
|
clang issues:
dtotimespec.c:31:25: error: implicit conversion from 'time_t' (aka
'long') to 'double' changes value from 9223372036854775807 to
9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]
else if (sec >= 1.0 + TYPE_MAXIMUM (time_t))
~ ^~~~~~~~~~~~~~~~~~~~~
../include/intprops.h:57:4: note: expanded from macro 'TYPE_MAXIMUM'
((t) (! TYPE_SIGNED (t)
\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So explicit cast it to double.
|
|
clang emits an error while building vfprintf-internal for default
case:
error: result of comparison of constant 255 with expression of type
'char' is always true
[-Werror,-Wtautological-constant-out-of-range-compare]
if (spec <= UCHAR_MAX
The test is indeed not required for default non-wide build.
|