[PATCH] D19625: [libc++] Void-cast runtime-unused variables.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 16:34:48 PDT 2016


STL_MSFT marked 2 inline comments as done.
STL_MSFT added a comment.

What I'm doing is running libcxx's tests against MSVC's compiler and libraries. I could aggressively suppress warnings (and indeed I'm doing that for the noisiest, lowest-value warnings), but instead I'm building the tests with /http://reviews.llvm.org/W4 (our highest supported level). It is indeed somewhat annoying to make tests warning-free, although it does find real issues occasionally (e.g. the broken assert that I reported first). The real value is verifying that the headers are warning-free, which has the potential to catch issues in the product code. This is possibly a difference in philosophy between VC's STL and libc++, because I believe libc++ uses the "system header" behavior to avoid all warnings from system headers.


================
Comment at: test/std/numerics/rand/rand.device/eval.pass.cpp:33
@@ -32,3 +32,3 @@
     }
-    catch (const std::system_error& e)
+    catch (const std::system_error&)
     {
----------------
EricWF wrote:
> This looks OK, but I noticed that *technically* the spec only says the exception type is derived from `std::exception`.
> 
> However if we can keep testing this exception without bothering anybody I say we do.
This one's problematic for MSVC for other reasons, but I have no issue with system_error here, so I haven't changed it.


http://reviews.llvm.org/D19625





More information about the cfe-commits mailing list