#95 AND causes promotion from int to long

closed-fixed
Johan Knol
5
2013-05-25
2001-07-21
Michael Hope
No

In this code (part of
support/regression/bug-408972.c):

int leftShiftIntMasked (int v) {
return ((v & 0xff00U) << 3);
}

the expression (v & 0xff00U) is promoted from int to
long. michaelh isn't sure, but I think with the U
both should be ints and shouldn't be promoted.

Discussion

  • Johan Knol
    Johan Knol
    2001-07-25

    • milestone: --> fixed
    • assigned_to: nobody --> johanknol
    • status: open --> closed-fixed