[PATCH v2 2/2] gdb, testsuite: Adapt gdb.base/callfuncs.exp for new clang warning.
Felix Willgerodt
felix.willgerodt@intel.com
Mon Jul 25 11:38:22 GMT 2022
Clang 15.0.0 added a new warning for deprecated non-prototype functions:
https://reviews.llvm.org/D122895
Callfuncs.exp is impacted and won't run due to new warnings:
callfuncs.c:339:5: warning: a function declaration without a prototype is
deprecated in all versions of C and is not supported in C2x
[-Wdeprecated-non-prototype]
int t_float_values (float_arg1, float_arg2)
This patch disables those warnings with -Wno-deprecated-non-prototype.
Removing the test for deprecated syntax would also be an option. But I will
leave that up for others to decide.
---
gdb/testsuite/gdb.base/callfuncs.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 4448cc127ba..d74357b8b48 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -18,7 +18,7 @@
standard_testfile
-set compile_flags {debug}
+set compile_flags {debug additional_flags=-Wno-deprecated-non-prototype}
if [support_complex_tests] {
lappend compile_flags "additional_flags=-DTEST_COMPLEX"
}
--
2.34.3
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list