CI: suppress -Wdeprecated-literal-operator failures on macOS - #333
Merged
Merged
Conversation
There is a C++11 defect report about a deprecated syntax for
user-defined literals¹ that compilers seem to have mostly ignored
before now. The macOS images seem to now pull in Clang 21 that warns
about this, failing compilation:
[ 4%] Building CXX object librumur/CMakeFiles/librumur.dir/src/Boolean.cc.o
In file included from rumur/rumur/wd/librumur/src/Boolean.cc:4:
In file included from rumur/rumur/wd/librumur/include/rumur/Boolean.h:5:
In file included from rumur/rumur/wd/librumur/include/rumur/Expr.h:6:
/usr/local/include/gmpxx.h:2163:29: error: identifier '_mpz' preceded by
whitespace in a literal operator declaration is deprecated
[-Werror,-Wdeprecated-literal-operator]
2163 | inline mpz_class operator"" _mpz(const char* s)
| ~~~~~~~~~~~^~~~
| operator""_mpz
/usr/local/include/gmpxx.h:2168:29: error: identifier '_mpq' preceded by
whitespace in a literal operator declaration is deprecated
[-Werror,-Wdeprecated-literal-operator]
2168 | inline mpq_class operator"" _mpq(const char* s)
| ~~~~~~~~~~~^~~~
| operator""_mpq
/usr/local/include/gmpxx.h:2175:29: error: identifier '_mpf' preceded by
whitespace in a literal operator declaration is deprecated
[-Werror,-Wdeprecated-literal-operator]
2175 | inline mpf_class operator"" _mpf(const char* s)
| ~~~~~~~~~~~^~~~
| operator""_mpf
3 errors generated.
There are a number of things I do not understand about this:
1. The GMP include directories are added as `SYSTEM`, so we should not
be seeing compiler warnings from their headers.
2. Of the 4 macOS jobs, the macOS+Macports+aarch64 is somehow not
affected by this despite seemingly using the same compiler and GMP
version.
The work arounds elsewhere on the internet are pretty unpleasant,² so
lets do some targeted -Werror disabling instead.
¹ https://cplusplus.github.io/CWG/issues/2521.html
² SRI-CSL/libpoly#110
Gitlab: cvc5/cvc5-rs#56
Reported-by: AppleClang 21.0.0.21000101 -Wdeprecated-literal-operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is a C++11 defect report about a deprecated syntax for user-defined literals¹ that compilers seem to have mostly ignored before now. The macOS images seem to now pull in Clang 21 that warns about this, failing compilation:
There are a number of things I do not understand about this:
SYSTEM, so we should not be seeing compiler warnings from their headers.The work arounds elsewhere on the internet are pretty unpleasant,² so lets do some targeted -Werror disabling instead.
¹ https://cplusplus.github.io/CWG/issues/2521.html
² SRI-CSL/libpoly#110
Gitlab: cvc5/cvc5-rs#56
Reported-by: AppleClang 21.0.0.21000101 -Wdeprecated-literal-operator