-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable building with gcc-14 #101623
Enable building with gcc-14 #101623
Conversation
Tagging subscribers to this area: @hoyosjs |
Updated gcc pipeline. gcc14 was picked up in the CI:
|
@am11 - did you run into any compilation issues with gcc-14 that does not repro on gcc-12. E.g. https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_apis/build/builds/706791/logs/284. It is not liking the presence of if/else inside static constexpr regMaskTP CreateFromRegNum(const regNumber reg, regMaskSmall mask)
{
#ifdef HAS_MORE_THAN_64_REGISTERS
if (reg < 64)
{
}
else
{
}
return regMaskTP(mask, RBM_NONE);
#else
return regMaskTP(mask, RBM_NONE);
#endif
} |
It's pedantically requiring single return for std=c++11 conformance: static constexpr regMaskTP CreateFromRegNum(regNumber reg, regMaskSmall mask)
{
#ifdef HAS_MORE_THAN_64_REGISTERS
return (reg < 64) ? regMaskTP(mask, RBM_NONE) : regMaskTP(RBM_NONE, mask);
#else
return regMaskTP(mask, RBM_NONE);
#endif
} (with std=c++14, if/else works) C++11 page 140: https://open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf
C++14 page 155: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf
|
hhm, how can i make my code work then in current scenario where we are on gcc-14 and in std=c++11 conformance? |
Have you tried the code provided above? |
sorry, earlier I missed that piece and was just staring at c++14 and c++11 conformance. Your suggestion works :) |
No description provided.