mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-01 08:48:20 +00:00
27b798fa4f
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
This directory contains include files of interfaces that are exported by components to be used by other components. Each subdirectory corresponds to the component exporting the interface.