SHA256
9
0
forked from pool/gdb
Files
gdb/gdb-testsuite-use-std-c99-in-gdb.base-nodebug.exp.patch
Tom de Vries fcf6764793 Fix bsc#1251213
- 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.
2025-11-26 08:34:17 +01:00

55 lines
1.6 KiB
Diff

From 7ff7fb4184861f31c624aafab433462ecafb4321 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 12 Nov 2025 11:08:31 +0100
Subject: [PATCH 06/25] [gdb/testsuite] Use -std=c99 in gdb.base/nodebug.exp
With test-case gdb.base/nodebug.exp I run into:
...
gdb compile failed, gdb.base/nodebug.c: In function 'multf_noproto':
gdb.base/nodebug.c:63:1: warning: old-style function definition \
[-Wold-style-definition]
63 | multf_noproto (v1, v2)
| ^~~~~~~~~~~~~
...
Fix this using -std=c99.
Tested on x86_64-linux.
PR testsuite/32756
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32756
---
gdb/testsuite/gdb.base/nodebug.exp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.exp
index 4c07d2ea9db..999c4217aa8 100644
--- a/gdb/testsuite/gdb.base/nodebug.exp
+++ b/gdb/testsuite/gdb.base/nodebug.exp
@@ -18,12 +18,17 @@
standard_testfile .c
-if [test_compiler_info "xlc-*"] {
+set exec_opts {}
+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 exec_opts additional_flags=-std=c99
+}
+
+if {[test_compiler_info "xlc-*"]} {
# By default, IBM'x xlc compiler doesn't add static variables into the symtab.
- # Use "-qstatsym" to do so.
- set exec_opts additional_flags=-qstatsym
-} else {
- set exec_opts ""
+ # Use "-qstatsym" to do so.
+ lappend exec_opts additional_flags=-qstatsym
}
if { [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != "" } {
--
2.51.0