diff options
author | Jonathan Yong <10walls@gmail.com> | 2025-04-09 14:21:22 +0000 |
---|---|---|
committer | Jonathan Yong <10walls@gmail.com> | 2025-04-11 01:56:23 +0000 |
commit | f4cdbd619d89147cf5767ddbb10fbeee8f1b0cbc (patch) | |
tree | d89b011c731a22b2c6c6f63c9d2a0b0614b1b301 /gcc | |
parent | 0c210fbbd70af16326ca64bf3447eb38b6fd6e0d (diff) | |
download | gcc-f4cdbd619d89147cf5767ddbb10fbeee8f1b0cbc.zip gcc-f4cdbd619d89147cf5767ddbb10fbeee8f1b0cbc.tar.gz gcc-f4cdbd619d89147cf5767ddbb10fbeee8f1b0cbc.tar.bz2 |
realloc-1.c: accept long long in warning for llp64
llp64 targets like mingw-w64 will print:
warning: ignoring return value of ‘void* __builtin_realloc(void*, long long unsigned int)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
Change the regex pattern to accept it.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/realloc-1.c: Make diagnostic accept
long long for __builtin_realloc warning.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/analyzer/realloc-1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/analyzer/realloc-1.c b/gcc/testsuite/c-c++-common/analyzer/realloc-1.c index 04925cf..0bb846c 100644 --- a/gcc/testsuite/c-c++-common/analyzer/realloc-1.c +++ b/gcc/testsuite/c-c++-common/analyzer/realloc-1.c @@ -92,5 +92,5 @@ void test_9 (void *p) void test_10 (char *s, int n) { __builtin_realloc(s, n); /* { dg-warning "ignoring return value of '__builtin_realloc' declared with attribute 'warn_unused_result'" "" { target c } } */ - /* { dg-warning "ignoring return value of 'void\\* __builtin_realloc\\(void\\*, (long )?unsigned int\\)' declared with attribute 'warn_unused_result'" "" { target c++ } .-1 } */ + /* { dg-warning "ignoring return value of 'void\\* __builtin_realloc\\(void\\*, (long )*unsigned int\\)' declared with attribute 'warn_unused_result'" "" { target c++ } .-1 } */ } /* { dg-warning "leak" } */ |