[Bug c++/118488] [OpenMP] Return types and templates with 'declare variant' mishandled
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 12 13:42:09 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118488
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=118530
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Given that clang allows expl1 as written but does not allow the version in
PR118530 that returns void rather than the template parameter, it seems that
the deduction they are doing to produce the variant considers the return type,
i.e. [temp.deduct.funcaddr] rather than [temp.deduct.call]. That is, given an
overload set, find a result with a type that matches the one you have for the
base function.
Since OpenMP requires the types to match, there is some appeal to this model
compared to the function call model, but the spec "The function variant is
determined by base language standard name lookup rules ([basic.lookup]) of
variant-name using the argument types at the call site..." seems to specify the
function call model.
Rejecting expl2 is just a bug.
More information about the Gcc-bugs
mailing list