]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: add braces
authorJason Merrill <jason@redhat.com>
Sun, 15 Sep 2024 09:48:46 +0000 (11:48 +0200)
committerJason Merrill <jason@redhat.com>
Wed, 18 Sep 2024 21:33:46 +0000 (17:33 -0400)
GCC compiles with -fno-exceptions, so __throw_exception_again is a no-op,
and compilation gives a -Wempty-body warning here, so let's wrap it as is
already done in a few other files.

libstdc++-v3/ChangeLog:

* include/bits/basic_ios.h: Add braces.

libstdc++-v3/include/bits/basic_ios.h

index bc3be4d2e37127f9f44e1e39688c666559821a23..2c2334d0fe3c6b0aaea2612cfed433fe32e164fd 100644 (file)
@@ -171,7 +171,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        // Turn this on without causing an ios::failure to be thrown.
        _M_streambuf_state |= __state;
        if (this->exceptions() & __state)
-         __throw_exception_again;
+         { __throw_exception_again; }
       }
 
       /**