]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
stdio: Fix tst-vfprintf-user-type on clang
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Sat, 2 Apr 2022 02:51:04 +0000 (23:51 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Oct 2025 16:54:55 +0000 (13:54 -0300)
The pointer alias comparison will be optimized away by the compiler,
and gcc and clang will evaluate differently (clang evaluates as
false, while gcc as true).

stdio-common/tst-vfprintf-user-type.c

index 3fc98b30f12f1550bc0cb46b0ffdce614d27bc41..41ae8a45c1eceeb3b2c52a56571af6794f867649 100644 (file)
@@ -183,7 +183,6 @@ do_test (void)
 #else
   extern int asprintf_alias (char **, const char *, ...) __asm__ ("asprintf");
 #endif
-  TEST_VERIFY (asprintf_alias == asprintf);
   char *str = NULL;
   TEST_VERIFY (asprintf_alias (&str, "[[%P]]", 123L, 456.0) >= 0);
   TEST_COMPARE_STRING (str, "[[(123, 456.000000)]]");