-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Avoid a space in the UDL definition #3610
Conversation
Clang 18 has grown a warning about the space being deprecated which is enabled by default in their nightly binaries. However GCC before 4.9 will reject the UDL definition unless there is a space there, so we need to keep the space conditionally for it.
GCC before 4.9 rejects the syntax that is now rejected on more modern compilers.
The compile tests should expect the UDL to be there on GCC only for version 4.9 and above.
It's a bit tricky to get the UDL tests to correctly fail to compile on gcc 4.8, but probably just because I am very unfamiliar with this type of test harness. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's exclude gcc < 4.9 from building compile-error-test here:
Line 178 in 28e2d3b
if (FMT_PEDANTIC AND NOT WIN32) |
and revert other changes to tests. It doesn't support compile-time checks anyway so the test is basically a noop there.
@danakj do you plan to update this PR? |
Yes, sorry for the delay here. |
Done, and looks like gcc 4.8 and gcc 10 are both happy. |
Thank you! |
No problem, thank you as well. |
* Avoid a space in the UDL definition except on GCC before 4.9 Clang 18 has grown a warning about the space being deprecated which is enabled by default in their nightly binaries. However GCC before 4.9 will reject the UDL definition unless there is a space there, so we need to keep the space conditionally for it. * Remove UDLs on GCC before 4.9 to simplify things GCC before 4.9 rejects the syntax that is now rejected on more modern compilers. * Disable compile-error-test on GCC < 4.9 This avoids the UDL tests failing as GCC < 4.9 can not parse UDLs without a space, but the space is malformed in modern compilers.
Clang 18 has grown a warning about the space being deprecated which
is enabled by default in their nightly binaries. However GCC before 4.9
will reject the UDL definition unless there is a space there, so we disable
the UDLs before GCC 4.9.
Closes #3607