[committed][testsuite] Fix compile warnings for def-decl with clang
Tom de Vries
tdevries@suse.de
Tue Feb 16 11:20:53 GMT 2021
Hi,
When running the test-suite with clang, we run into these warnings:
...
clang++ decl.c def.c def2.c -Itestsuite/dwz.tests -o def-decl -g
clang-10.0: warning: treating 'c' input as 'c++' when in C++ mode, \
this behavior is deprecated [-Wdeprecated]
clang-10.0: warning: treating 'c' input as 'c++' when in C++ mode, \
this behavior is deprecated [-Wdeprecated]
clang-10.0: warning: treating 'c' input as 'c++' when in C++ mode, \
this behavior is deprecated [-Wdeprecated]
...
Fix these by renaming the source files from .c to .cc.
Committed to trunk.
Thanks,
- Tom
[testsuite] Fix compile warnings for def-decl with clang
2021-02-16 Tom de Vries <tdevries@suse.de>
* testsuite/dwz.tests/decl.c: Rename to .cc.
* testsuite/dwz.tests/def.c: Same.
* testsuite/dwz.tests/def2.c: Same.
* Makefile (def-decl): Update source file names.
---
Makefile | 4 ++--
testsuite/dwz.tests/{decl.c => decl.cc} | 0
testsuite/dwz.tests/{def.c => def.cc} | 0
testsuite/dwz.tests/{def2.c => def2.cc} | 0
4 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 3fa3a27..d320266 100644
--- a/Makefile
+++ b/Makefile
@@ -128,8 +128,8 @@ odr-loc:
def-decl:
- $(CXX) $(TEST_SRC)/decl.c $(TEST_SRC)/def.c $(TEST_SRC)/def2.c -I$(TEST_SRC) \
- -o $@ -g
+ $(CXX) $(TEST_SRC)/decl.cc $(TEST_SRC)/def.cc $(TEST_SRC)/def2.cc \
+ -I$(TEST_SRC) -o $@ -g
# On some systems we need to set and export DEJAGNU to suppress
# WARNING: Couldn't find the global config file.
diff --git a/testsuite/dwz.tests/decl.c b/testsuite/dwz.tests/decl.cc
similarity index 100%
rename from testsuite/dwz.tests/decl.c
rename to testsuite/dwz.tests/decl.cc
diff --git a/testsuite/dwz.tests/def.c b/testsuite/dwz.tests/def.cc
similarity index 100%
rename from testsuite/dwz.tests/def.c
rename to testsuite/dwz.tests/def.cc
diff --git a/testsuite/dwz.tests/def2.c b/testsuite/dwz.tests/def2.cc
similarity index 100%
rename from testsuite/dwz.tests/def2.c
rename to testsuite/dwz.tests/def2.cc
More information about the Dwz
mailing list