• Kenton Varda's avatar
    GCC doesn't accept (void) to silence warn_unused_result. · f6df70e5
    Kenton Varda authored
    This is stupid, but the GCC maintainers refused to change it:
    
        https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
    
    For some reason, KJ's uses of (void) did not warn with GCC 5 but do warn with GCC 7. Supposedly, GCC *never* supported silencing with (void), so there must have been some other bug that caused GCC to fail to trigger the warning previously -- maybe related to the fact that the values being returned are non-trivial types?
    
    C++17 introduces `[[nodiscard]]` which is defined as being squelchable using `(void)`, but we're still on C++14, and KJ_UNUSED_RESULT is a post-declaration attribute so can't be defined in terms of the new C++17 attribute even if the compiler supports it. Sigh.
    f6df70e5
Name
Last commit
Last update
..
gtest.h Loading commit data...
gzip-test.c++ Loading commit data...
gzip.c++ Loading commit data...
gzip.h Loading commit data...
http-test.c++ Loading commit data...
http.c++ Loading commit data...
http.h Loading commit data...
make-test-certs.sh Loading commit data...
readiness-io-test.c++ Loading commit data...
readiness-io.c++ Loading commit data...
readiness-io.h Loading commit data...
tls-test.c++ Loading commit data...
tls.c++ Loading commit data...
tls.h Loading commit data...
url-test.c++ Loading commit data...
url.c++ Loading commit data...
url.h Loading commit data...