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

silence compiler warnings for gcc 4.7 and before #53

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

DerDakon
Copy link
Contributor

@DerDakon DerDakon commented Oct 7, 2022

The option -Wliteral-suffix was introduced in gcc 4.8, and #pragma GCC diagnostic push was added in 4.6. Using the header with an older gcc would lead to warnings like:

string_view.hpp:438: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
string_view.hpp:439: warning: unknown option after '#pragma GCC diagnostic' kind
string_view.hpp:1681: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'

The option -Wliteral-suffix was introduced in gcc 4.8, and
"#pragma GCC diagnostic push" was added in 4.6. Using the header with an older
gcc would lead to warnings like:

string_view.hpp:438: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
string_view.hpp:439: warning: unknown option after '#pragma GCC diagnostic' kind
string_view.hpp:1681: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic'
@DerDakon DerDakon changed the title silency compiler warnings for gcc 4.7 and before silence compiler warnings for gcc 4.7 and before Oct 7, 2022
@martinmoene martinmoene merged commit ced5f2e into martinmoene:master Oct 12, 2022
@DerDakon DerDakon deleted the old-gcc branch October 12, 2022 18:11
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