[PATCH] c++: Add std::to_underlying to the set of stdlib functions that are always folded
Jason Merrill
jason@redhat.com
Wed May 14 14:21:37 GMT 2025
On 5/14/25 9:32 AM, Ville Voutilainen wrote:
> On Wed, 14 May 2025 at 16:30, Ville Voutilainen
> <ville.voutilainen@gmail.com> wrote:
>>
>> On Wed, 14 May 2025 at 16:26, Patrick Palka <ppalka@redhat.com> wrote:
>>>> r = CALL_EXPR_ARG (x, 0);
>>>> /* Check that the return and argument types are sane before
>>>> folding. */
>>>
>>> This comment should be removed too, along with the sanity check.
>>
>> I'll commit-as-obvious that removal, I already pushed the patch.
>
> Then again.. should we even keep that !same_type_p bit? We trust the
> library, why have even that remainder of a 'sanity' check?
If it's already the same type, we don't need a conversion.
Jason
More information about the Libstdc++
mailing list