mirror of
https://github.com/matrix-construct/construct
synced 2024-09-29 20:28:52 +02:00
ircd::ctx: Ignore strict aliasing for hacks we never dereference.
This commit is contained in:
parent
d745e65ee1
commit
4ac88356d9
1 changed files with 6 additions and 0 deletions
|
@ -116,6 +116,8 @@ void
|
|||
ircd::ctx::set(shared_state<T> &st,
|
||||
const future_state &state)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
switch(state)
|
||||
{
|
||||
case future_state::INVALID: assert(0); return;
|
||||
|
@ -129,6 +131,7 @@ ircd::ctx::set(shared_state<T> &st,
|
|||
reinterpret_cast<uintptr_t &>(st.p) = uintptr_t(0x123);
|
||||
return;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/// Internal use
|
||||
|
@ -137,6 +140,8 @@ inline void
|
|||
ircd::ctx::set(shared_state<void> &st,
|
||||
const future_state &state)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
switch(state)
|
||||
{
|
||||
case future_state::INVALID: assert(0); return;
|
||||
|
@ -150,6 +155,7 @@ ircd::ctx::set(shared_state<void> &st,
|
|||
reinterpret_cast<uintptr_t &>(st.p) = uintptr_t(0x123);
|
||||
return;
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/// Internal; check if the current state is something; safe but unnecessary
|
||||
|
|
Loading…
Reference in a new issue