Skip to content

Commit

Permalink
Parser: fix long double casting when same size as double
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexu committed Oct 9, 2024
1 parent 69e30f4 commit c47cbfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aro/Parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5818,11 +5818,11 @@ pub const Result = struct {
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
}
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return;
if (p.comp.target.cTypeBitSize(.longdouble) == 80) {
if (p.comp.target.cTypeBitSize(.longdouble) >= p.comp.target.cTypeBitSize(.double)) {
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
}
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return;
if (p.comp.target.cTypeBitSize(.longdouble) == 64) {
if (p.comp.target.cTypeBitSize(.longdouble) >= p.comp.target.cTypeBitSize(.float)) {
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
}
if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return;
Expand Down

0 comments on commit c47cbfa

Please sign in to comment.