I'm not sure this is fixed, please correct me if wrong, but
#include <stdio.h>
#include <stdint.h>
int main(void)
{
const uint8_t u = 0U;
const uint8_t y = (uint8_t) ~u;
return ((uint8_t) u != (uint8_t) ~y);
}
gives warning
test.c: In function ‘main’:
test.c:9:25: warning: comparison of promoted bitwise complement of an unsigned value with unsigned [-Wsign-compare]
9 | return ((uint8_t) u != (uint8_t) ~y);
| ^~
Does this not mean that this issue is still present?
I'm not sure this is fixed, please correct me if wrong, but
#include <stdio.h>
#include <stdint.h>
int main(void)
{
const uint8_t u = 0U;
const uint8_t y = (uint8_t) ~u;
return ((uint8_t) u != (uint8_t) ~y);
}
gives warning
test.c: In function ‘main’:
test.c:9:25: warning: comparison of promoted bitwise complement of an unsigned value with unsigned [-Wsign-compare]
9 | return ((uint8_t) u != (uint8_t) ~y);
| ^~
Does this not mean that this issue is still present?