-
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
warnings under Xcode 6.1.1 (probably with -Weverything) #96
Comments
one more: in Result visit(const Arg &arg) clang complains about the fallthrough in release mode and suggests inserting [[clang::fallthrough]]. This gives a warning in debug mode though, because after the assert(false) it is unreachable code. |
and use it to silence one of the warnings in #96.
Reopening until the fallthrough warning is resolved. |
@dixlorenz Could you please check if the fix in branch fallthrough resolves the fallthrough warning? I tried detecting the availability of |
Almost perfect. It resolves the fallthrough warning, but in debug build I now get warning: fallthrough annotation in unreachable code because of the assert(false)... Somewhat interestingly (to me): this code
does not give a warning about unreachable code (or any other). That might be the easiest/cleanest solution. It does have the same semantics as the fallthrough and doesn't need macros, #ifdefs or rely on the compiler or its version at all. |
So does this commit fixes the warnings? (I used your suggestion but simplified it a bit since there is no need to dispatch there.) If it works I'll merge it into master and remove the fallthrough attribute detection. |
That works perfectly, no warning, neither in debug or in release. |
Closing the issue via 04a21bb then. Thanks again for your help. |
commit ba17cca, 2/6/2015:
format.h:
Unknown Command Tag Name:
line #142: /rst
line #164: \endrst
line #1567: out.write("Current point:\n");
the last one ist about "\n"; this might well be an Xcode bug
format.cpp:
Semantic issue, 'return' will never be executed
line #254, line #276
these returns are after an unconditional FMT_THROW
warning: comparison of integers of different signs: 'const int' and 'std::size_t' (aka 'unsigned long')
line #628: if (spec.precision_ >= 0 && spec.precision_ < str_size)
spec.precision_ and str_size are the problem.
The text was updated successfully, but these errors were encountered: