https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103092

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |12255

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #2)
> G++ does not give an error for the example in p5:
> 
> class A { /* ... */ };
> void (*pf1)(); // no exception specification
> void (*pf2)() throw(A);
> 
> void f() {
>   pf1 = pf2; // OK: pf1 is less restrictive
>   pf2 = pf1; // error: pf2 is more restrictive
> }
> 
> That should be ill-formed in C++98/11/14.

The above testcase is PR 12255.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12255
[Bug 12255] [C++98/11/14 only] exception-specification ignored on pointer to
function

Reply via email to