aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-10-31 17:56:07 +0000
committerJoseph Myers <josmyers@redhat.com>2024-10-31 17:56:07 +0000
commit241d419c46f381f9351b1957d7d34f177e0303ba (patch)
tree38e72e23161d62c9418014ecd54dded3a4b57c4f
parentb23de8ec7694883b1c203e1f12e3ea6d249f23f8 (diff)
downloadgcc-241d419c46f381f9351b1957d7d34f177e0303ba.zip
gcc-241d419c46f381f9351b1957d7d34f177e0303ba.tar.gz
gcc-241d419c46f381f9351b1957d7d34f177e0303ba.tar.bz2
testsuite: Fix prototype in gcc.dg/pr114115.c
One test failing with a -std=gnu23 default that I wanted to investigate further is gcc.dg/pr114115.c. Building with -std=gnu23 produces a warning: pr114115.c:18:8: warning: 'ifunc' resolver for 'foo_ifunc2' should return 'void * (*)(void)' [-Wattribute-alias=] It turns out that this warning (from cgraphunit.cc) is disabled for unprototyped functions. Fix the return type for foo_ifunc2 so the test builds without warnings both with and without -std=gnu23. Tested for x86_64. * gcc.dg/pr114115.c (foo_ifunc2): Return void.
-rw-r--r--gcc/testsuite/gcc.dg/pr114115.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/pr114115.c b/gcc/testsuite/gcc.dg/pr114115.c
index 2629f59..5e3ef57 100644
--- a/gcc/testsuite/gcc.dg/pr114115.c
+++ b/gcc/testsuite/gcc.dg/pr114115.c
@@ -3,7 +3,7 @@
/* { dg-require-profiling "-fprofile-generate" } */
/* { dg-require-ifunc "" } */
-void *foo_ifunc2() __attribute__((ifunc("foo_resolver")));
+void foo_ifunc2() __attribute__((ifunc("foo_resolver")));
void bar(void)
{