diff mbox series

Testsuite: Mark check_effective_target_exceptions_enabled test as C++ test input.

Message ID 20200610170359.GA1239@arm.com
State New
Headers show
Series Testsuite: Mark check_effective_target_exceptions_enabled test as C++ test input. | expand

Commit Message

Tamar Christina June 10, 2020, 5:04 p.m. UTC
Hi All,

The test in check_effective_target_exceptions_enabled uses a C++ keyword `throw`
and the test fails with a syntax error on any non-g++ test.  I now tell the
testsuite driver that this is a C++ input file so it runs it as such in all the
drivers.

Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_exceptions_enabled):
	Mark as C++ test input.

--

Comments

Richard Sandiford June 10, 2020, 5:09 p.m. UTC | #1
Tamar Christina <tamar.christina@arm.com> writes:
> Hi All,
>
> The test in check_effective_target_exceptions_enabled uses a C++ keyword `throw`
> and the test fails with a syntax error on any non-g++ test.  I now tell the
> testsuite driver that this is a C++ input file so it runs it as such in all the
> drivers.

Nice!  Seen that message a few times but never quite drummed up the
enthusiasm to fix it.

> Regtested on aarch64-none-linux-gnu and no issues.
>
> Ok for master?

OK, thanks.

Richard

>
> Thanks,
> Tamar
>
> gcc/testsuite/ChangeLog:
>
> 	* lib/target-supports.exp (check_effective_target_exceptions_enabled):
> 	Mark as C++ test input.
diff mbox series

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b4da4ddf86063288abd353569c4dc7c75ce326f0..a9a57ce5518cfe29e3888c28011cb6f84f18e75f 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9518,6 +9518,7 @@  proc check_effective_target_exceptions_enabled {} {
     return [check_cached_effective_target exceptions_enabled {
 	if { [check_effective_target_exceptions] } {
 	    return [check_no_compiler_messages exceptions_enabled assembly {
+		// C++
 		void foo (void)
 		{
 		    throw 1;