public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2022-10-28 17:44 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:44 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7a74ac2067c84776769fd2c1d992aab88d8a3eed

commit 7a74ac2067c84776769fd2c1d992aab88d8a3eed
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2024-02-09 17:34 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7d7aff5199acbc3218b1d6d7a35112f0c95065c6

commit 7d7aff5199acbc3218b1d6d7a35112f0c95065c6
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 1be6dd7782..93f8abab56 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2024-02-07 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cd5cdea43f2a932bfa366fcca593bc106d88c970

commit cd5cdea43f2a932bfa366fcca593bc106d88c970
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 1be6dd7782..93f8abab56 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2024-01-29 18:00 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:00 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f93a57d7810fd8977c928a500c81254fad90bf4e

commit f93a57d7810fd8977c928a500c81254fad90bf4e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 1be6dd7782..93f8abab56 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2023-12-21 18:56 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=1cb5f21bfe7270b1466a0cd54306295db0ae25c9

commit 1cb5f21bfe7270b1466a0cd54306295db0ae25c9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 6d5a5f8a59..b9c0a16c63 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2023-09-28 17:54 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=09c3225001d42e2cdd63207cafa92e22756d502b

commit 09c3225001d42e2cdd63207cafa92e22756d502b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 6d5a5f8a59..b9c0a16c63 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2023-08-30 12:39 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:39 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=948cce6cf63c2aa3182f3e6018724ac3c0229fe7

commit 948cce6cf63c2aa3182f3e6018724ac3c0229fe7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 6d5a5f8a59..b9c0a16c63 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2023-02-09 19:51 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:51 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=79f490b74240a38dba828531e54c2bdedd0d9f0b

commit 79f490b74240a38dba828531e54c2bdedd0d9f0b
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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 6d5a5f8a59..b9c0a16c63 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] 9+ messages in thread

* [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
@ 2022-10-04 13:02 Adhemerval Zanella
  0 siblings, 0 replies; 9+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=37e6bcc2fd095ea91c2cad87afbe4adea9274315

commit 37e6bcc2fd095ea91c2cad87afbe4adea9274315
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Jun 3 10:43:42 2022 -0300

    stdio: Suppress clang warnings for tst-vprintf-width-i18n.c
    
    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.

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] 9+ messages in thread

end of thread, other threads:[~2024-02-09 17:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 17:44 [glibc/azanella/clang] stdio: Suppress clang warnings for tst-vprintf-width-i18n.c Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-02-09 17:34 Adhemerval Zanella
2024-02-07 14:09 Adhemerval Zanella
2024-01-29 18:00 Adhemerval Zanella
2023-12-21 18:56 Adhemerval Zanella
2023-09-28 17:54 Adhemerval Zanella
2023-08-30 12:39 Adhemerval Zanella
2023-02-09 19:51 Adhemerval Zanella
2022-10-04 13:02 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).