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

adapt code to compile with msys2 mingw compiler #1548

Merged
merged 1 commit into from
Dec 25, 2016

Conversation

adrpo
Copy link
Contributor

@adrpo adrpo commented Dec 24, 2016

  • add required extra flags to the C++ compiler in CMakeLists.txt
  • guard some code with _MSC_VER instead of WIN32

[cut]
Thank you for proposing a contribution to the ANTLR project. In order to accept changes from the outside world, all contributors must "sign" the contributors.txt contributors certificate of origin. It's an unfortunate reality of today's fuzzy and bizarre world of open-source ownership.

Make sure you are already in the contributors.txt file or add a commit to this pull request with the appropriate change. Thanks!
[/cut]

- add required extra flags to the C++ compiler in CMakeLists.txt
- guard some code with _MSC_VER instead of WIN32
@parrt
Copy link
Member

parrt commented Dec 24, 2016

@mike-lischke do you bless this?

@mike-lischke
Copy link
Member

Hmm, the change from _WIN32 to _MSC_VER is actually unneeded, but it doesn't harm. Ok, ship it.

@parrt parrt added this to the 4.6.1 milestone Dec 25, 2016
@parrt parrt merged commit 1c987e7 into antlr:master Dec 25, 2016
@Biswa96
Copy link
Contributor

Biswa96 commented Jun 21, 2022

the change from _WIN32 to _MSC_VER is actually unneeded

It is needed for non-MSVC based toolchain. The #pragma warning directive is MSVC specific. So, in other toolchain, like gcc or clang mingw, that directive will show warnings.

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

Successfully merging this pull request may close these issues.

4 participants