Skip to content

Commit

Permalink
Disable -Winvalid-offsetof in FEBase.cpp
Browse files Browse the repository at this point in the history
See #1662 for some further details. This will not be easy to solve
becalse it is not straightforward to covert `TR::JitConfig` to a POD
so we can use `offsetof`. This will hopefully be solved via the options
framework overhaul, so fixing this warning properly is not worth the
effort at the moment. Instead we locally disable this warning around
the problematic area.
  • Loading branch information
fjeremic committed May 7, 2021
1 parent 36f9278 commit 140c336
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/env/FEBase.cpp
Expand Up @@ -95,6 +95,8 @@ char *feGetEnv(const char *s)
#include "control/Options.hpp"
#include "control/Options_inlines.hpp"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"

TR::OptionTable OMR::Options::_feOptions[] =
{
Expand All @@ -114,6 +116,7 @@ TR::OptionTable OMR::Options::_feOptions[] =
{0}
};

#pragma clang diagnostic pop

#include "control/Recompilation.hpp"

Expand Down

0 comments on commit 140c336

Please sign in to comment.