Skip to content

Workaround GCC 10&11 optimiser compilation failure#402

Merged
jonathan-r-thorpe merged 2 commits intosony:masterfrom
alanb-sony:patch-1
Aug 1, 2024
Merged

Workaround GCC 10&11 optimiser compilation failure#402
jonathan-r-thorpe merged 2 commits intosony:masterfrom
alanb-sony:patch-1

Conversation

@alanb-sony
Copy link
Copy Markdown
Contributor

GCC 10 and 11 seem to have an issue compiling the std::lexicographical_compare statements in json_ops.h. The issue seems to be that the operators used inside std::lexicographical_compare aren't defined before the call to std::lexicographical_compare.

This only seems to cause a problem for GCC 10 and 11, with c++20 and optimisations enabled. Clang always rejects the code.

A reduced example of the problem: https://godbolt.org/z/9ra6hn7c9

Copy link
Copy Markdown
Contributor

@jonathan-r-thorpe jonathan-r-thorpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@lo-simon lo-simon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonathan-r-thorpe jonathan-r-thorpe merged commit 6d64db8 into sony:master Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants