This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/4] MSP430: Disable exception handling by default for C++


Jozef Lawrynowicz <jozef.l@mittosystems.com> writes:
> diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
> index 1df645e283c..1ce449cb935 100644
> --- a/gcc/testsuite/lib/gcc-dg.exp
> +++ b/gcc/testsuite/lib/gcc-dg.exp
> @@ -417,6 +417,16 @@ proc gcc-dg-prune { system text } {
>  	return "::unsupported::large return values"
>      }
>  
> +    # If exceptions are disabled, mark tests expecting exceptions to be enabled
> +    # as unsupported.
> +    if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] {
> +	return "::unsupported::exception handling disabled"
> +    }

This is probably safe, but...

> +
> +    if [regexp "(^|\n)\[^\n\]*: error: #error .__cpp_exceptions." $text] {
> +	return "::unsupported::exception handling disabled"
> +    }

...it looks like this would disable g++.dg/cpp1y/feat-neg.C for all
targets.  I assume this was motivated by g++.dg/cpp2a/feat-cxx2a.C,
but the kind of effective-target tests you had in the original patch
are probably better there.  It might then be more robust to test that
[check_effective_target_...] for the "exception handling disabled" case
above as well, so that other targets aren't affected accidentally.

It'd be good to test a target/multilib that has exceptions enabled by
default to make sure there's no change in the number of unsupported
tests (rather than just no new fails).

Thanks,
Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]