Skip to content

Commit

Permalink
Make tests work for u/intptr_t on CHERI. This needs looking at again,…
Browse files Browse the repository at this point in the history
… but serves the purpose of a baseline set of changes to explore and failures at runtime.
  • Loading branch information
gcjenkinson committed Apr 12, 2023
1 parent eb024b6 commit 62da2a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/google/protobuf/stubs/strutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,11 @@ struct Hex {
// their unsigned counterparts.
#ifdef LANG_CXX11
static_assert(
#if defined(__CHERI_PURE_CAPABILITY__)
sizeof(v) == 1 || sizeof(v) == 2 || sizeof(v) == 4 || sizeof(v) == 8 || sizeof(v) == 16,
#else
sizeof(v) == 1 || sizeof(v) == 2 || sizeof(v) == 4 || sizeof(v) == 8,
#endif
"Unknown integer type");
#endif
value = sizeof(v) == 1 ? static_cast<uint8>(v)
Expand Down

0 comments on commit 62da2a9

Please sign in to comment.