public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-10-28 17:45 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:45 UTC (permalink / raw)
  To: glibc-cvs

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

commit 0d6e05ed2f8065e053c1ba75f9c9580400c58d9d
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2024-02-09 17:35 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:35 UTC (permalink / raw)
  To: glibc-cvs

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

commit ab4559ac2dfd25c8cb5d8cc3687843ab80263ea4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 66fc42c03d..d622e741ec 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2024-02-07 14:10 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:10 UTC (permalink / raw)
  To: glibc-cvs

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

commit c26bb502d4180f193d27bc9a9622c1f657b88059
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 66fc42c03d..d622e741ec 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2024-01-29 18:00 Adhemerval Zanella
  0 siblings, 0 replies; 19+ 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=a28664caff3ecdecdc3ea1ed586f2f866318a506

commit a28664caff3ecdecdc3ea1ed586f2f866318a506
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 66fc42c03d..d622e741ec 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2023-12-21 18:57 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:57 UTC (permalink / raw)
  To: glibc-cvs

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

commit 44b77a874f9c17e350c303e5031a878a492e1d91
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 08c2c71ef5..a6d7864f81 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2023-09-28 17:55 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:55 UTC (permalink / raw)
  To: glibc-cvs

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

commit aa3b5bf27485bc3a41d90604ae1d439238d0d85a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 08c2c71ef5..a6d7864f81 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2023-08-30 12:40 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:40 UTC (permalink / raw)
  To: glibc-cvs

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

commit 9b486d234d0ea37d6613f68e99a433551cc06f72
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 08c2c71ef5..a6d7864f81 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2023-02-09 19:51 Adhemerval Zanella
  0 siblings, 0 replies; 19+ 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=7c1a2e6cd25b900711991f2175432d9713db72fa

commit 7c1a2e6cd25b900711991f2175432d9713db72fa
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index aee191e5c0..62b66c3b23 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-10-04 13:02 Adhemerval Zanella
  0 siblings, 0 replies; 19+ 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=8a43f21a9a3c548a6c30a9e249ec1e61c4174010

commit 8a43f21a9a3c548a6c30a9e249ec1e61c4174010
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    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.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-06-09 21:23 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:23 UTC (permalink / raw)
  To: glibc-cvs

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

commit 27702f49b115881073c888cf036a37466b40a80a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-06-09 13:20 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:20 UTC (permalink / raw)
  To: glibc-cvs

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

commit 27702f49b115881073c888cf036a37466b40a80a
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-06-03 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:09 UTC (permalink / raw)
  To: glibc-cvs

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

commit 8a01d858c5e08da6763ac08221347048e231e9ca
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-05-13 14:23 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:23 UTC (permalink / raw)
  To: glibc-cvs

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

commit c8ee4cf0c90d6011a6d39fe56aa98268486bf6a8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-05-12 19:37 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:37 UTC (permalink / raw)
  To: glibc-cvs

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

commit 9cd9eb7241867320f696fd51f03d45fb5e87ea18
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-05-10 18:27 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:27 UTC (permalink / raw)
  To: glibc-cvs

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

commit b5eca12a056f0594504075866d85360e796631d1
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-04-29 14:07 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:07 UTC (permalink / raw)
  To: glibc-cvs

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

commit 15297d2c7c2929a983c56fe015fc52feb669f9e4
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-04-04 12:58 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:58 UTC (permalink / raw)
  To: glibc-cvs

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

commit fa5adac9df02c10e04f2b4b7fbc87db47c2c5f6e
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-03-31 19:10 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:10 UTC (permalink / raw)
  To: glibc-cvs

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

commit fe57500f84064da2578d8a0ccca27467fde4899f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [glibc/azanella/clang] support: Suppress clang warning on tst-timespec
@ 2022-03-29 20:34 Adhemerval Zanella
  0 siblings, 0 replies; 19+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:34 UTC (permalink / raw)
  To: glibc-cvs

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

commit 7f5385bb4c9c80fc589d42bccb5e24506b3ef1f9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:26:46 2022 -0300

    support: Suppress clang warning on tst-timespec
    
    clang warns that converting from TIME_T_MAX to double (upper_bound)
    loses precision (from 9223372036854775807 to 9223372036854775808).
    It does not matter in the test.A
    
    Checked on x86_64-linux-gnu.

Diff:
---
 support/tst-timespec.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/tst-timespec.c b/support/tst-timespec.c
index 648a990e9c..b3cbb866ce 100644
--- a/support/tst-timespec.c
+++ b/support/tst-timespec.c
@@ -20,6 +20,7 @@
 #include <support/check.h>
 #include <limits.h>
 #include <intprops.h>
+#include <libc-diag.h>
 
 #define TIMESPEC_HZ 1000000000
 
@@ -179,6 +180,11 @@ struct timespec_norm_test_case norm_cases[] = {
   }
 };
 
+/* clang warns that converting from TIME_T_MAX to double (upper_bound)
+   loses precision (from 9223372036854775807 to 9223372036854775808).
+   It does not matter in tests below.  */
+DIAG_PUSH_NEEDS_COMMENT_CLANG;
+DIAG_IGNORE_NEEDS_COMMENT_CLANG (13, "-Wimplicit-const-int-float-conversion");
 /* Test cases for timespec_check_in_range  */
 struct timespec_test_case check_cases[] = {
   /* 0 - In range  */
@@ -290,6 +296,7 @@ struct timespec_test_case check_cases[] = {
    .upper_bound = TIME_T_MAX, .lower_bound = 1, .result = 1,
   },
 };
+DIAG_POP_NEEDS_COMMENT_CLANG;
 
 static int
 do_test (void)


^ permalink raw reply	[flat|nested] 19+ messages in thread

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

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 17:45 [glibc/azanella/clang] support: Suppress clang warning on tst-timespec Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-02-09 17:35 Adhemerval Zanella
2024-02-07 14:10 Adhemerval Zanella
2024-01-29 18:00 Adhemerval Zanella
2023-12-21 18:57 Adhemerval Zanella
2023-09-28 17:55 Adhemerval Zanella
2023-08-30 12:40 Adhemerval Zanella
2023-02-09 19:51 Adhemerval Zanella
2022-10-04 13:02 Adhemerval Zanella
2022-06-09 21:23 Adhemerval Zanella
2022-06-09 13:20 Adhemerval Zanella
2022-06-03 14:09 Adhemerval Zanella
2022-05-13 14:23 Adhemerval Zanella
2022-05-12 19:37 Adhemerval Zanella
2022-05-10 18:27 Adhemerval Zanella
2022-04-29 14:07 Adhemerval Zanella
2022-04-04 12:58 Adhemerval Zanella
2022-03-31 19:10 Adhemerval Zanella
2022-03-29 20:34 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).