[binutils-gdb] gdb.base/nodebug.exp: Disable -Wdeprecated-non-prototype
Pedro Alves via Gdb-cvs <[email protected]> Wed, 22 Jul 2026 12:30:14 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D1fd3a6133823= 2de33f80db0de085229e0e2c261a commit 1fd3a61338232de33f80db0de085229e0e2c261a Author: Pedro Alves <[email protected]> Date: Tue Jul 14 00:49:52 2026 +0100 gdb.base/nodebug.exp: Disable -Wdeprecated-non-prototype =20 Testing gdb.base/nodebug.exp with Clang shows: =20 .../gdb.base/nodebug.c:63:1: warning: a function definition without a = prototype is deprecated in all versions of C and is not supported in C23 [-= Wdeprecated-non-prototype] 63 | multf_noproto (v1, v2) | ^ =20 Fix it by making gdb.base/nodebug.exp disable -Wdeprecated-non-prototyp= e. =20 Tested with Clang 18.1.3 on x86_64-pc-linux-gnu, and Clang 21.0.0git on x86_64-pc-windows-msvc. =20 Approved-By: Tom Tromey <[email protected]> Change-Id: Id207053331377abec6918aa1188180d609c74273 Diff: --- gdb/testsuite/gdb.base/nodebug.exp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/no= debug.exp index e4138a801da..9cdff5d5560 100644 --- a/gdb/testsuite/gdb.base/nodebug.exp +++ b/gdb/testsuite/gdb.base/nodebug.exp @@ -25,6 +25,15 @@ if {[have_compile_flag -std=3Dc99]} { lappend exec_opts additional_flags=3D-std=3Dc99 } =20 +if {[test_compiler_info "clang-*"]} { + # Even with -std=3Dc99, Clang warns like so: + # + # warning: a function definition without a prototype is deprecated + # in all versions of C and is not supported in C23 + # [-Wdeprecated-non-prototype] + lappend exec_opts additional_flags=3D-Wno-deprecated-non-prototype +} + if {[test_compiler_info "xlc-*"]} { # By default, IBM's xlc compiler doesn't add static variables into the= symtab. # Use "-qstatsym" to do so.