public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] stdio: Fix tst-vprintf-width-i18n for clang
@ 2022-06-03 14:13 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:13 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=527908e064dec2ccbe846de530da5250090638b8
commit 527908e064dec2ccbe846de530da5250090638b8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Jun 3 10:43:42 2022 -0300
stdio: Fix tst-vprintf-width-i18n for clang
Diff:
---
stdio-common/tst-vfprintf-width-i18n.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/stdio-common/tst-vfprintf-width-i18n.c b/stdio-common/tst-vfprintf-width-i18n.c
index 2355f30d67..69b4888fa9 100644
--- a/stdio-common/tst-vfprintf-width-i18n.c
+++ b/stdio-common/tst-vfprintf-width-i18n.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <support/support.h>
#include <support/check.h>
+#include <libc-diag.h>
static int
do_test (void)
@@ -48,6 +49,9 @@ do_test (void)
TEST_COMPARE_STRING (buf, " INR12,345.67");
/* Translated. */
+ /* clang does not know about the GNU extension 'I'. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16);
TEST_COMPARE_STRING (buf, " १२३४५");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 26);
@@ -58,6 +62,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " १२,३४५");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 26);
TEST_COMPARE_STRING (buf, " १२,३४५.६७");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
xsetlocale (LC_ALL, "ps_AF.UTF-8");
@@ -78,6 +83,8 @@ do_test (void)
TEST_COMPARE_STRING (buf, " 12٬346 AFN"); /* Counts bytes. */
/* Translated. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I11d", 12345), 11);
TEST_COMPARE_STRING (buf, " ١٢٣۴٥");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 20);
@@ -88,6 +95,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 21);
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥٫٦٧");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/azanella/clang] stdio: Fix tst-vprintf-width-i18n for clang
@ 2022-06-09 13:23 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:23 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d825c8a0815d89f4fa7bdffd1ea73e78fd6fb8f8
commit d825c8a0815d89f4fa7bdffd1ea73e78fd6fb8f8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Jun 3 10:43:42 2022 -0300
stdio: Fix tst-vprintf-width-i18n for clang
Diff:
---
stdio-common/tst-vfprintf-width-i18n.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/stdio-common/tst-vfprintf-width-i18n.c b/stdio-common/tst-vfprintf-width-i18n.c
index 2355f30d67..69b4888fa9 100644
--- a/stdio-common/tst-vfprintf-width-i18n.c
+++ b/stdio-common/tst-vfprintf-width-i18n.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <support/support.h>
#include <support/check.h>
+#include <libc-diag.h>
static int
do_test (void)
@@ -48,6 +49,9 @@ do_test (void)
TEST_COMPARE_STRING (buf, " INR12,345.67");
/* Translated. */
+ /* clang does not know about the GNU extension 'I'. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16);
TEST_COMPARE_STRING (buf, " १२३४५");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 26);
@@ -58,6 +62,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " १२,३४५");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 26);
TEST_COMPARE_STRING (buf, " १२,३४५.६७");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
xsetlocale (LC_ALL, "ps_AF.UTF-8");
@@ -78,6 +83,8 @@ do_test (void)
TEST_COMPARE_STRING (buf, " 12٬346 AFN"); /* Counts bytes. */
/* Translated. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I11d", 12345), 11);
TEST_COMPARE_STRING (buf, " ١٢٣۴٥");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 20);
@@ -88,6 +95,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 21);
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥٫٦٧");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [glibc/azanella/clang] stdio: Fix tst-vprintf-width-i18n for clang
@ 2022-06-09 21:27 Adhemerval Zanella
0 siblings, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:27 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d825c8a0815d89f4fa7bdffd1ea73e78fd6fb8f8
commit d825c8a0815d89f4fa7bdffd1ea73e78fd6fb8f8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Fri Jun 3 10:43:42 2022 -0300
stdio: Fix tst-vprintf-width-i18n for clang
Diff:
---
stdio-common/tst-vfprintf-width-i18n.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/stdio-common/tst-vfprintf-width-i18n.c b/stdio-common/tst-vfprintf-width-i18n.c
index 2355f30d67..69b4888fa9 100644
--- a/stdio-common/tst-vfprintf-width-i18n.c
+++ b/stdio-common/tst-vfprintf-width-i18n.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <support/support.h>
#include <support/check.h>
+#include <libc-diag.h>
static int
do_test (void)
@@ -48,6 +49,9 @@ do_test (void)
TEST_COMPARE_STRING (buf, " INR12,345.67");
/* Translated. */
+ /* clang does not know about the GNU extension 'I'. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I16d", 12345), 16);
TEST_COMPARE_STRING (buf, " १२३४५");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 26);
@@ -58,6 +62,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " १२,३४५");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 26);
TEST_COMPARE_STRING (buf, " १२,३४५.६७");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
xsetlocale (LC_ALL, "ps_AF.UTF-8");
@@ -78,6 +83,8 @@ do_test (void)
TEST_COMPARE_STRING (buf, " 12٬346 AFN"); /* Counts bytes. */
/* Translated. */
+ DIAG_PUSH_NEEDS_COMMENT_CLANG;
+ DIAG_IGNORE_NEEDS_COMMENT_CLANG (14, "-Wformat-invalid-specifier");
TEST_COMPARE (sprintf (buf, "%I11d", 12345), 11);
TEST_COMPARE_STRING (buf, " ١٢٣۴٥");
TEST_COMPARE (sprintf (buf, "%I12.2f", 12345.67), 20);
@@ -88,6 +95,7 @@ do_test (void)
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥");
TEST_COMPARE (sprintf (buf, "%'I12.2f", 12345.67), 21);
TEST_COMPARE_STRING (buf, " ١٢٬٣۴٥٫٦٧");
+ DIAG_POP_NEEDS_COMMENT_CLANG;
return 0;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-09 21:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 14:13 [glibc/azanella/clang] stdio: Fix tst-vprintf-width-i18n for clang Adhemerval Zanella
2022-06-09 13:23 Adhemerval Zanella
2022-06-09 21:27 Adhemerval Zanella
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).