public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8982] coreutils-sum-pr108666.c: fix spurious LLP64 warnings
@ 2024-02-14 15:57 Jonathan Yong
  0 siblings, 0 replies; only message in thread
From: Jonathan Yong @ 2024-02-14 15:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:eafbb05c49957096d5118dfa661c0efba774bd8b

commit r14-8982-geafbb05c49957096d5118dfa661c0efba774bd8b
Author: Jonathan Yong <10walls@gmail.com>
Date:   Fri Feb 2 23:47:47 2024 +0000

    coreutils-sum-pr108666.c: fix spurious LLP64 warnings
    
    Fixes the following warnings on x86_64-w64-mingw32:
    coreutils-sum-pr108666.c:17:1: warning: conflicting types for built-in function ‘memcpy’; expected ‘void *(void *, const void *, long long unsigned int)’ [-Wbuiltin-declaration-mismatch]
       17 | memcpy(void* __restrict __dest, const void* __restrict __src, size_t __n)
          | ^~~~~~
    
    coreutils-sum-pr108666.c:25:1: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long long unsigned int)’ [-Wbuiltin-declaration-mismatch]
       25 | malloc(size_t __size) __attribute__((__nothrow__, __leaf__))
          | ^~~~~~
    
    gcc/testsuite:
    
            * c-c++-common/analyzer/coreutils-sum-pr108666.c: Use
            __SIZE_TYPE__ instead of long unsigned int for size_t
            definition.
    
    Signed-off-by: Jonathan Yong <10walls@gmail.com>

Diff:
---
 gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c b/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
index 5684d1b02d45..dadd27eaf410 100644
--- a/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
+++ b/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
@@ -1,6 +1,6 @@
 /* Reduced from coreutils's sum.c: bsd_sum_stream */
 
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 typedef unsigned char __uint8_t;
 typedef unsigned long int __uintmax_t;
 typedef struct _IO_FILE FILE;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-14 15:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 15:57 [gcc r14-8982] coreutils-sum-pr108666.c: fix spurious LLP64 warnings Jonathan Yong

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).