Skip to content
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

CONFIGURE: Add -fno-operator-names for clang/gcc #2246

Open
wants to merge 2 commits into
base: master
from

Conversation

@mduggan
Copy link
Contributor

mduggan commented May 12, 2020

The use of operator names works fine on gcc and clang, but breaks MSVC. Make
them error on gcc/clang too.

According to this random link, gcc and clang have supported this flag for a
really long time, so it shouldn't need an extra compile check:
https://phabricator.kde.org/D3850

Since I've never changed the configure file before I wanted to get more eyes on this change, so doing as a PR.

Background: My last PR (#2214) contained an and, which worked on all the buildbots, but broke when someone tried to compile with MSVC. This should avoid similar breakage in the future.

The use of operator names works fine on gcc and clang, but breaks MSVC.  Make
them error on gcc/clang too.

According to this random link, gcc and clang have supported this flag for a
really long time, so it shouldn't need an extra compile check:
https://phabricator.kde.org/D3850
@mduggan
Copy link
Contributor Author

mduggan commented May 13, 2020

Hmm.. this revealed another use of these operators..

engines/wintermute/wintermute.cpp:154:10: error: token is not a valid binary
      operator in a preprocessor subexpression
        #if not defined(USE_PNG) || not defined(USE_JPEG) || not defined...
            ~~~ ^
engines/wintermute/wintermute.cpp:165:10: error: token is not a valid binary
      operator in a preprocessor subexpression
        #if not defined(ENABLE_FOXTAIL)
            ~~~ ^
engines/wintermute/wintermute.cpp:176:10: error: token is not a valid binary
      operator in a preprocessor subexpression
        #if not defined(ENABLE_HEROCRAFT)
            ~~~ ^

I'll fix them too and add to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.