Skip to content

clang 21 unhappy with differen types for the 2'nd and 3'rd args of the trinary operator #223

@eyalroz

Description

@eyalroz

If we have:

t1 x = (t1) cond ? y : z;

and y and z are of differeing, though compatible, types - clang 21 complains:

warning: implicit conversion increases floating-point precision: 'double' to
'long double' [-Wdouble-promotion]

Indeed, we do have two cases of this happening, when choosing between double and long_double interpretation of the next parameter.

So, let's make it:

t1 x = cond ? (t1) y : (t1) z;

to shut clang up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolved-on-developA changeset fixing this issue has been commiutted to the development branchtask

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions