public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com, mark@klomp.org
Subject: [committed][testsuite] Fix compile warnings for def-decl with clang
Date: Tue, 16 Feb 2021 12:20:53 +0100	[thread overview]
Message-ID: <20210216112052.GA26516@delia> (raw)

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

                 reply	other threads:[~2021-02-16 11:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210216112052.GA26516@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=mark@klomp.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).