Add pretty-printing support for __is_nothrow_{assignable, constructible}. [PR98054]

Jason Merrill jason@redhat.com
Tue Dec 1 15:28:06 GMT 2020


On 11/30/20 8:50 AM, Marek Polacek wrote:
> On Mon, Nov 30, 2020 at 01:19:32PM +0200, Ville Voutilainen via Gcc-patches wrote:
>> OK for trunk if full testsuite passes? Should we consider having some sort
>> of test that catches such omissions?
> 
> IMHO this doesn't require a test.
> 
>> 2020-11-30  Ville Voutilainen  <ville.voutilainen@gmail.com>
>>
>>      gcc/
 >>
>>      PR c++/98054
>>      * cp/cxx-pretty-print.c (pp_cxx_trait_expression):
>>      Add support for __is_nothrow_{assignable,constructible}.
> 
> No "cp/" please.

And change the gcc/ above to gcc/cp/.  OK with that change.

>> diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
>> index 058b9c2f4fc..1cdf0772a6b 100644
>> --- a/gcc/cp/cxx-pretty-print.c
>> +++ b/gcc/cp/cxx-pretty-print.c
>> @@ -2666,6 +2666,12 @@ pp_cxx_trait_expression (cxx_pretty_printer *pp, tree t)
>>       case CPTK_IS_CONSTRUCTIBLE:
>>         pp_cxx_ws_string (pp, "__is_constructible");
>>         break;
>> +    case CPTK_IS_NOTHROW_ASSIGNABLE:
>> +      pp_cxx_ws_string (pp, "__is_nothrow_assignable");
>> +      break;
>> +    case CPTK_IS_NOTHROW_CONSTRUCTIBLE:
>> +      pp_cxx_ws_string (pp, "__is_nothrow_constructible");
>> +      break;
>>   
>>       default:
>>         gcc_unreachable ();
> 
> Looks fine, thanks.
> 
> Marek
> 



More information about the Gcc-patches mailing list