diff options
author | Jonathan Yong <10walls@gmail.com> | 2025-04-13 02:41:36 +0000 |
---|---|---|
committer | Jonathan Yong <10walls@gmail.com> | 2025-04-15 11:38:40 +0000 |
commit | 039b566f2f03699676d31b681d1595bddc94a774 (patch) | |
tree | 9f71c8615639bd14ac6826de6a16b2fa0afe0528 | |
parent | a591629420b39a44a9232226e662bb8681396384 (diff) | |
download | gcc-039b566f2f03699676d31b681d1595bddc94a774.zip gcc-039b566f2f03699676d31b681d1595bddc94a774.tar.gz gcc-039b566f2f03699676d31b681d1595bddc94a774.tar.bz2 |
Wbuiltin-declaration-mismatch-4.c: accept long long in warning for llp64
llp64 targets like mingw-w64 will print:
gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c:80:17: warning: ‘memset’ argument 3 promotes to ‘ptrdiff_t’ {aka ‘long long int’} where ‘long long unsigned int’ is expected in a call to built-in function declared without prototype [-
Wbuiltin-declaration-mismatch]
Change the regex pattern to accept it.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
gcc/testsuite/ChangeLog:
* gcc.dg/Wbuiltin-declaration-mismatch-4.c: Make diagnostic
accept long long.
-rw-r--r-- | gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c index c48fe5f..09aaaa6 100644 --- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c +++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c @@ -77,9 +77,9 @@ void test_integer_conversion_memset (void *d) /* Passing a ptrdiff_t where size_t is expected may not be unsafe but because GCC may emits suboptimal code for such calls warning for them helps improve efficiency. */ - memset (d, 0, diffi); /* { dg-warning ".memset. argument 3 promotes to .ptrdiff_t. {aka .\(long \)?\(int\)?\(__int20\)?.} where .\(long \)?\(__int20 \)?unsigned\( int\)?. is expected" } */ + memset (d, 0, diffi); /* { dg-warning ".memset. argument 3 promotes to .ptrdiff_t. {aka .\(long \)*\(int\)?\(__int20\)?.} where .\(long \)*\(__int20 \)?unsigned\( int\)?. is expected" } */ - memset (d, 0, 2.0); /* { dg-warning ".memset. argument 3 type is .double. where '\(long \)?\(__int20 \)?unsigned\( int\)?' is expected" } */ + memset (d, 0, 2.0); /* { dg-warning ".memset. argument 3 type is .double. where '\(long \)*\(__int20 \)?unsigned\( int\)?' is expected" } */ /* Verify that the same call as above but to the built-in doesn't trigger a warning. */ |