seqan / seqan3

The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.
https://www.seqan.de
Other
396 stars 81 forks source link

[INFRA] Add IntelLLVM CI #3225

Closed eseiler closed 5 months ago

eseiler commented 5 months ago

Second commit:

The result of

to_little_endian(*reinterpret_cast<uint16_t const *>(&header[10]))

is erroneous due to some optimization (the Intel compiler uses some more aggressive optimization by default). The cast is probably undefined (or at least unspecified) behavior.

Usually, this is because the value is not properly bound to in in

template <std::integral type>
constexpr type to_little_endian(type const in) noexcept

This also occasionally happens with other compilers.

My solution is to either use the left or right byte, depending on the endianness. Since we cast to uint16_t, and only compare one byte, the correct byte should be either of the two. Currently, we do not officially support / test big endian archs.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
seqan3 ✅ Ready (Inspect) Visit Preview Jan 30, 2024 11:25am
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5c321ec) 98.17% compared to head (5ea70ac) 98.17%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3225 +/- ## ======================================= Coverage 98.17% 98.17% ======================================= Files 269 269 Lines 11854 11854 ======================================= Hits 11638 11638 Misses 216 216 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.