mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
As far as I can tell this is not raised by any released GCC versions. Clang 13 on the other hand warns about it due to implicit-int-conversion warning which is automatically enabled together with Wconversion. The problem is relatively simple, shifting access_t value does not always produce result which is also of access_t type. For example, if access_t is uint16_t, shifting it will produce integer result. This can be observed even with GCC. Building the following C++ example will fail: #include <type_traits> #include <stdint.h> int test() { uint16_t a = 0xabcd; static_assert(std::is_same_v<decltype(a<<1), uint16_t>); return 0; } Changing uint16_t in the static_assert to int, will allow the code to build. Make such int to access_t implicit conversion explicit to allow the code to be compiled with both GCC and clang. Issue #4354 |
||
---|---|---|
.. | ||
arg_string.h | ||
array.h | ||
attempt.h | ||
avl_string.h | ||
avl_tree.h | ||
bit_allocator.h | ||
bit_array.h | ||
construct_at.h | ||
fifo.h | ||
flex_iterator.h | ||
interface.h | ||
list_model.h | ||
list.h | ||
meta.h | ||
misc_math.h | ||
mmio.h | ||
noncopyable.h | ||
print_lines.h | ||
reconstructible.h | ||
register_set.h | ||
register.h | ||
retry.h | ||
string.h | ||
token.h | ||
touch.h | ||
xml_generator.h | ||
xml_node.h |