* gcc-7 warning breaks ld testsuite
@ 2017-02-28 22:30 Alan Modra
2017-03-02 0:09 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: Alan Modra @ 2017-02-28 22:30 UTC (permalink / raw)
To: binutils
.../ld/testsuite/ld-elf/new.cc:21:31: warning: dynamic exception specifications are deprecated in C++11; use
'noexcept' instead [-Wdeprecated]
operator new (std::size_t sz) throw (std::bad_alloc)
^~~~~
The same warning is given for ld/testsuite/ld-elf/dl5.cc, and result
in the tests failing with ERROR. What's the right thing to do about
the above gcc-7 warning, given that many different compilers might be
used to build binutils?
I'm leaning towards passing -ansi.
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 41fb2ba..070915a 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -581,10 +581,10 @@ set build_cxx_tests {
"-shared -Wl,--dynamic-list-cpp-typeinfo" "-fPIC"
{dl3.cc} {} "libdl3c.so" "c++"}
{"Build libdnew1a.so with --Bsymbolic-functions --dynamic-list-cpp-new"
- "-shared -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" "-fPIC"
+ "-shared -Wl,-Bsymbolic-functions,--dynamic-list-cpp-new" "-fPIC -ansi"
{del.cc new.cc} {} "libnew1a.so" "c++"}
{"Build libdnew1b.so with --dynamic-list-data --dynamic-list-cpp-new"
- "-shared -Wl,--dynamic-list-data,--dynamic-list-cpp-new" "-fPIC"
+ "-shared -Wl,--dynamic-list-data,--dynamic-list-cpp-new" "-fPIC -ansi"
{del.cc new.cc} {} "libnew1b.so" "c++"}
}
@@ -601,10 +601,10 @@ set run_cxx_tests {
{dl3main.cc} "dl3c" "dl3a.out" "" "c++"}
{"Run with libnew1a.so"
"-Wl,--no-as-needed tmpdir/libnew1a.so" ""
- {dl5.cc} "dl5a" "dl5.out" "" "c++"}
+ {dl5.cc} "dl5a" "dl5.out" "-ansi" "c++"}
{"Run with libnew1b.so"
"-Wl,--no-as-needed tmpdir/libnew1b.so" ""
- {dl5.cc} "dl5b" "dl5.out" "" "c++"}
+ {dl5.cc} "dl5b" "dl5.out" "-ansi" "c++"}
}
run_cc_link_tests $build_cxx_tests
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gcc-7 warning breaks ld testsuite
2017-02-28 22:30 gcc-7 warning breaks ld testsuite Alan Modra
@ 2017-03-02 0:09 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2017-03-02 0:09 UTC (permalink / raw)
To: binutils
On Wed, Mar 01, 2017 at 08:59:54AM +1030, Alan Modra wrote:
> .../ld/testsuite/ld-elf/new.cc:21:31: warning: dynamic exception specifications are deprecated in C++11; use
> 'noexcept' instead [-Wdeprecated]
> operator new (std::size_t sz) throw (std::bad_alloc)
> ^~~~~
>
> The same warning is given for ld/testsuite/ld-elf/dl5.cc, and result
> in the tests failing with ERROR. What's the right thing to do about
> the above gcc-7 warning, given that many different compilers might be
> used to build binutils?
>
> I'm leaning towards passing -ansi.
I think I may as well commit that patch. If there's a better solution
then we can update as required later.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-02 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 22:30 gcc-7 warning breaks ld testsuite Alan Modra
2017-03-02 0:09 ` Alan Modra
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).