On 5/15/25 4:58 PM, Ville Voutilainen wrote:
On Thu, 15 May 2025 at 18:32, Ville Voutilainen
wrote:
On Thu, 15 May 2025 at 18:19, Jason Merrill wrote:
@@ -3347,8 +3347,6 @@ cp_fold (tree x, fold_flags_t flags)
|| id_equal (DECL_NAME (callee), "as_const")))
{
On Thu, 15 May 2025 at 18:32, Ville Voutilainen
wrote:
>
> On Thu, 15 May 2025 at 18:19, Jason Merrill wrote:
>
> > > @@ -3347,8 +3347,6 @@ cp_fold (tree x, fold_flags_t flags)
> > > || id_equal (DECL_NAME (callee), "as_const")))
> > > {
> > > r = CALL_EXPR_ARG (x,
On 5/15/25 10:36 AM, Ville Voutilainen wrote:
This is a follow-up to the earlier patch that adds std::to_underlying to the
set of stdlib functions that are folded. We don't seem to need to handle
the same-type case specially, the folding will just do the right thing.
Also fix up the mistake of n
On Thu, 15 May 2025 at 18:19, Jason Merrill wrote:
> > @@ -3347,8 +3347,6 @@ cp_fold (tree x, fold_flags_t flags)
> > || id_equal (DECL_NAME (callee), "as_const")))
> > {
> > r = CALL_EXPR_ARG (x, 0);
> > - if (!same_type_p (TREE_TYPE (x), TREE_TYPE (r)))
>
This is a follow-up to the earlier patch that adds std::to_underlying to the
set of stdlib functions that are folded. We don't seem to need to handle
the same-type case specially, the folding will just do the right thing.
Also fix up the mistake of not tweaking the cmdline switch doc in the earlie