Skip to content

Conversation

ArthurSonzogni
Copy link
Contributor

Some Microsoft's specific #pragma were left in the code. They causes the
following errors to be printed:

/tmp/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp:1351:9:
warning: unknown pragma ignored [-Wunknown-pragmas]
may be unsafe. Consider using _dupenv_s instead.
        ^
/tmp/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp:1361:9:
warning: unknown pragma ignored [-Wunknown-pragmas]

This patch removes the #pragma macros and uses the matching compiler
definition only on MSVC compiler.

Some Microsoft's specific #pragma were left in the code. They causes the
following errors to be printed:
```
/tmp/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp:1351:9:
warning: unknown pragma ignored [-Wunknown-pragmas]
may be unsafe. Consider using _dupenv_s instead.
        ^
/tmp/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp:1361:9:
warning: unknown pragma ignored [-Wunknown-pragmas]
```

This patch removes the #pragma macros and uses the matching compiler
definition only on MSVC compiler.
@ArthurSonzogni
Copy link
Contributor Author

Note: The "contributors.txt" will be updated first in: #2899. So I won't do it here.

@mike-lischke
Copy link
Member

Not all users build the runtime using cmake. So your change will leave them then with new warnings.

@ArthurSonzogni
Copy link
Contributor Author

Not all users build the runtime using cmake. So your change will leave them then with new warnings.

Indeed! Thanks!
I haven't thought about this requirement.

@ArthurSonzogni ArthurSonzogni deleted the remove-pragma branch September 10, 2020 17:34
@ArthurSonzogni ArthurSonzogni restored the remove-pragma branch September 10, 2020 17:34
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.

2 participants