diff --git a/gdb/testsuite/gdb.base/nodebug.exp b/gdb/testsuite/gdb.base/nodebug.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=c99]} {
     lappend exec_opts additional_flags=-std=c99
 }
 
+if {[test_compiler_info "clang-*"]} {
+    # Even with -std=c99, 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=-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.
