- Patches added: * avoid-crash-with-length.patch * correct-bounds-check-when-working-around-gas-dwarf-5.patch * fix-crash-in-f-typeprint.c.patch - Patches added (swo#33560, bsc#1251213): * bfd-elf-handle-prstatus-of-156-bytes-in-elf32_arm_na.patch * gdb-corefiles-fix-segfault-in-add_thread_silent.patch - Patches added (swo#32542, swo#33354): * change-return-value-of-_bfd_mmap_temporary.patch - Patches added (swo#33068, swo#33069): * gdb-fix-handling-of-aborted-inferior-call.patch - Patches added (swo#33620): * gdb-rust-fix-handling-of-unsigned-discriminant.patch - Patches added (swo#33444): * have-gdb.threadexitedevent-inherit-from-gdb.threadev.patch - Patches added (swo#33617): * mark-pascal-as-case-insensitive.patch - Patches added (testsuite): * check-gnatmake-version-in-gnat_version_compare.patch * gdb-testsuite-fix-build-id-check-in-gdb.python-py-mi.patch * gdb-testsuite-fix-gdb.mi-mi-sym-info.exp.patch * gdb-testsuite-fix-gdb.rust-methods.exp-on-i686-linux.patch * gdb-testsuite-fix-main-in-gdb.trace-mi-trace-frame-c.patch * gdb-testsuite-fix-possible-tcl-errors-in-gdb.threads.patch * gdb-testsuite-fix-sizeof-test-in-gdb.rust-simple.exp.patch * gdb-testsuite-fix-xfail-in-gdb.ada-array_of_variant..patch * gdb-testsuite-fix-xfail-in-gdb.ada-variant_record_fi.patch * gdb-testsuite-force-dwarf-in-gdb.pascal.patch * gdb-testsuite-rust-fix-for-empty-array.patch * gdb-testsuite-use-expect_build_id_in_core_file-a-bit.patch * gdb-testsuite-use-std-c99-in-gdb.base-callfuncs.exp.patch * gdb-testsuite-use-std-c99-in-gdb.base-nodebug.exp.patch * powerpc-mark-rtti-typeid-tests-as-expected-fail-befo.patch - Maintenance script import-patches.sh: * Use git instead of osc. - Maintenance script qa.sh: * Add PR32893 kfail.
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
From 24f5907ddb7fd5157ce3cc938bb5b5bcdeb54460 Mon Sep 17 00:00:00 2001
|
|
From: Tom de Vries <tdevries@suse.de>
|
|
Date: Sun, 9 Nov 2025 08:07:57 +0100
|
|
Subject: [PATCH 05/25] [gdb/testsuite] Use -std=c99 in gdb.base/callfuncs.exp
|
|
|
|
In test-case gdb.base/callfuncs.exp I run into:
|
|
...
|
|
gdb compile failed, gdb.base/callfuncs.c: In function 't_func_values':
|
|
gdb.base/callfuncs.c:611:12: error: too many arguments to function \
|
|
'func_arg1'; expected 0, have 2
|
|
611 | return ((*func_arg1) (5,5) == (*func_val1) (5,5)
|
|
| ~^~~~~~~~~~~ ~
|
|
...
|
|
|
|
Fix this by using -std=c99.
|
|
|
|
Tested on x86_64-linux.
|
|
|
|
Approved-By: Tom Tromey <tom@tromey.com>
|
|
|
|
PR testsuite/32756
|
|
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32756
|
|
---
|
|
gdb/testsuite/gdb.base/callfuncs.exp | 14 ++++++++++++--
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
|
|
index 494b6dfa96f..ed979603a26 100644
|
|
--- a/gdb/testsuite/gdb.base/callfuncs.exp
|
|
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
|
|
@@ -18,10 +18,20 @@
|
|
|
|
standard_testfile
|
|
|
|
+set compile_flags {}
|
|
+lappend compile_flags debug
|
|
+
|
|
# We still want to test non-prototype functions for now, which is why
|
|
# we disable compilers warning about them.
|
|
-set compile_flags {debug additional_flags=-Wno-deprecated-non-prototype}
|
|
-if [support_complex_tests] {
|
|
+lappend compile_flags additional_flags=-Wno-deprecated-non-prototype
|
|
+
|
|
+if {[have_compile_flag -std=c99]} {
|
|
+ # Gcc 15 defaults to c23, which no longer supports unprototyped functions.
|
|
+ # Use a c dialect that does support this.
|
|
+ lappend compile_flags additional_flags=-std=c99
|
|
+}
|
|
+
|
|
+if {[support_complex_tests]} {
|
|
lappend compile_flags "additional_flags=-DTEST_COMPLEX"
|
|
}
|
|
|
|
--
|
|
2.51.0
|
|
|