Closed cxz66666 closed 1 year ago
When I build atomic_queue with
-Wall
, I found following errors:
You provided no reproduction for the issue. Not sure what and how you build.
The benchmark and the unit tests in the continuous integration are built with -W{all,extra,error}
, no errors.
When I build atomic_queue with
-Wall
, I found following errors:error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversion] return or_equal(or_equal(x, u), rest...); ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
The error message says it is caused by -Wsign-conversion
, which is not part of -Wall
.
-Wsign-conversion
is rather toxic because it breaks perfectly well-formed code.
When I build atomic_queue with
-Wall
, I found following errors:So just use unsigned constant to avoid it!