From patchwork Mon Apr 18 15:44:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 611785 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qpXXW06Rcz9t3f for ; Tue, 19 Apr 2016 01:45:13 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=SsGS2A32; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Bw9r/MtB6EPxk7OfDAzPYMx3NQfNpDXNEs4WDRkvrVJZlGRucoShF 78jYukVKtsjc3ncGOjk4KDSxbsuy0w5edZVHGV1VijdwqsE9TFZN50/FY/wp6T/1 JOvj525RGsB3893LAMEx8BLo7ahAegocjLj0lW2CrKqg1gFr2KYlIQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=A4vukieOYPhLE43QtbBfA/0U7hg=; b=SsGS2A323vSjIc3ppNPL 8Sm12KiUKlqAxVDQCudM4rtYZnln5sQWsaewsPHdlmLtWbXYl9+bOcckpggMFqM/ FiXecLSWG83R6H1NlPxNwO8xVLQgpMXAu+qo/vc61An9JcB9OLfIr1Tm7PVqTFyC ddyUIihlch7zyATW5p705DQ= Received: (qmail 46094 invoked by alias); 18 Apr 2016 15:44:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 45815 invoked by uid 89); 18 Apr 2016 15:44:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=to_string, tidy, bfs, interfere X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 18 Apr 2016 15:44:41 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D1C47F368; Mon, 18 Apr 2016 15:44:37 +0000 (UTC) Received: from localhost (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3IFiaL8012708; Mon, 18 Apr 2016 11:44:36 -0400 Date: Mon, 18 Apr 2016 16:44:35 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [patch] Patches to reduce warnings in libstdc++ Message-ID: <20160418154435.GE2839@redhat.com> MIME-Version: 1.0 Content-Disposition: inline X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.5.24 (2015-08-30) Some small cleanups. These won't interfere with any testing of backports to gcc-6-branch before the release, so I'm committing them now. The first two remove some noise when using -Wsystem-headers: Avoid -Wsign-compare warnings in std::to_string() * include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare warnings. Add attribute((unused)) in libstdc++ headers * include/bits/locale_facets.h (ctype::do_narrow): Add attribute to unused parameter. * include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise. The other two remove some noise when running the testsuite with -Wpedantic, and tidy up some tests. Tested x86_64-linux, committed to trunk. commit ea1ef677b26ad2cb1f811f11b089778782e7da5e Author: Jonathan Wakely Date: Sat Apr 16 16:58:47 2016 +0100 Make use of extensions more explicit in libstdc++ tests * testsuite/18_support/bad_exception/23591_thread-1.c: Add -Wno-pedantic to dg-options. * testsuite/20_util/align/2.cc: Use type as operand of alignof. * testsuite/20_util/is_floating_point/value.cc: Add -Wno-pedantic to dg-options. * testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc: Remove extra semi-colon. * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Always supply second argument to static_assert. * testsuite/25_algorithms/lower_bound/no_operator_ne.cc: Remove extra semi-colon. * testsuite/26_numerics/complex/c99.cc: Add -Wno-pedantic to dg-options. * testsuite/26_numerics/complex/literals/values.cc: Likewise. * testsuite/29_atomics/atomic/60695.cc: Likewise. * testsuite/29_atomics/atomic/62259.cc: use __alignof__ instead of alignof when operand is an object not a type. * testsuite/decimal/ctor.cc: Add -Wno-pedantic to dg-options. * testsuite/decimal/make-decimal.cc: Likewise. * testsuite/experimental/type_traits/value.cc: Always supply second argument to static_assert. * testsuite/util/testsuite_common_types.h: Use __extension__ for __int128 types. diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c index a0fe0d7..fd1a76c 100644 --- a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c +++ b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c @@ -1,5 +1,5 @@ // { dg-require-sharedlib "" } -// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none" { target *-*-linux* *-*-gnu* *-*-solaris2.1[2-9]* } } +// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none -Wno-pedantic" { target *-*-linux* *-*-gnu* *-*-solaris2.1[2-9]* } } // Copyright (C) 2005-2016 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/20_util/align/2.cc b/libstdc++-v3/testsuite/20_util/align/2.cc index 243debb..e2d1907 100644 --- a/libstdc++-v3/testsuite/20_util/align/2.cc +++ b/libstdc++-v3/testsuite/20_util/align/2.cc @@ -32,7 +32,7 @@ test01() int i = 0; void* ptr = &i; auto space = sizeof(i); - auto p2 = std::align(alignof(i), space, ptr, space); + auto p2 = std::align(alignof(int), space, ptr, space); VERIFY( ptr == &i ); VERIFY( p2 == &i ); VERIFY(space == sizeof(i)); diff --git a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc index d476383..8ed73fc 100644 --- a/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc +++ b/libstdc++-v3/testsuite/20_util/is_floating_point/value.cc @@ -1,4 +1,4 @@ -// { dg-options "-std=gnu++11" } +// { dg-options "-std=gnu++11 -Wno-pedantic" } // { dg-do compile } // // Copyright (C) 2011-2016 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc index 821d012..fc05426 100644 --- a/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc +++ b/libstdc++-v3/testsuite/20_util/specialized_algorithms/uninitialized_fill/32158.cc @@ -31,4 +31,4 @@ Alpha(MyPair* start, MyPair* end) { MyPair my_pair(1, 2); std::uninitialized_fill(start, end, my_pair); -}; +} diff --git a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc index 6abe049..96e0bfb 100644 --- a/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc +++ b/libstdc++-v3/testsuite/23_containers/array/tuple_interface/tuple_element.cc @@ -47,7 +47,7 @@ test01() static_assert(is_same::type, volatile int>::value, ""); static_assert( (is_same::type, - volatile int>::value == true) ); + volatile int>::value == true), "" ); static_assert(is_same::type, const volatile int>::value, ""); diff --git a/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc b/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc index d787ff0..219e093 100644 --- a/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc +++ b/libstdc++-v3/testsuite/25_algorithms/lower_bound/no_operator_ne.cc @@ -22,8 +22,8 @@ // http://gcc.gnu.org/ml/libstdc++/2000-06/msg00316.html struct foo { }; -bool operator== (const foo&, const foo&) { return true; }; -bool operator< (const foo&, const foo&) { return true; }; +bool operator== (const foo&, const foo&) { return true; } +bool operator< (const foo&, const foo&) { return true; } void bar(foo* a, foo* b, foo& x) { diff --git a/libstdc++-v3/testsuite/26_numerics/complex/c99.cc b/libstdc++-v3/testsuite/26_numerics/complex/c99.cc index 4dfaad6..c550520 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex/c99.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex/c99.cc @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-std=gnu++11" } +// { dg-options "-std=gnu++11 -Wno-pedantic" } // Copyright (C) 2012-2016 Free Software Foundation, Inc. // diff --git a/libstdc++-v3/testsuite/26_numerics/complex/literals/values.cc b/libstdc++-v3/testsuite/26_numerics/complex/literals/values.cc index b50aad9..1353112 100644 --- a/libstdc++-v3/testsuite/26_numerics/complex/literals/values.cc +++ b/libstdc++-v3/testsuite/26_numerics/complex/literals/values.cc @@ -1,4 +1,4 @@ -// { dg-options "-std=gnu++14" } +// { dg-options "-std=gnu++14 -Wno-pedantic" } // { dg-do run } // Copyright (C) 2013-2016 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc b/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc index e9b8b20..ddd1b2c 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/60695.cc @@ -1,5 +1,5 @@ // { dg-require-atomic-builtins "" } -// { dg-options "-std=gnu++11" } +// { dg-options "-std=gnu++11 -Wno-pedantic" } // { dg-do compile } // Copyright (C) 2014-2016 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc b/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc index 5429ca9..458194a 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic/62259.cc @@ -44,7 +44,7 @@ struct power_of_two_obj { std::atomic obj1; -static_assert( alignof(obj1) >= alignof(int64_t), +static_assert( __alignof__(obj1) >= alignof(int64_t), "std::atomic not suitably aligned" ); struct container_struct { @@ -54,5 +54,5 @@ struct container_struct { container_struct obj2; -static_assert( alignof(obj2.ao) >= alignof(int64_t), +static_assert( __alignof__(obj2.ao) >= alignof(int64_t), "std::atomic not suitably aligned" ); diff --git a/libstdc++-v3/testsuite/decimal/ctor.cc b/libstdc++-v3/testsuite/decimal/ctor.cc index f322e7f..b289ed0 100644 --- a/libstdc++-v3/testsuite/decimal/ctor.cc +++ b/libstdc++-v3/testsuite/decimal/ctor.cc @@ -16,6 +16,7 @@ // . // { dg-require-effective-target dfp } +// { dg-options "-Wno-pedantic" } // ISO/IEC TR 24733 3.2.2.1 Construct/copy/destroy (decimal32). // ISO/IEC TR 24733 3.2.3.1 Construct/copy/destroy (decimal64). diff --git a/libstdc++-v3/testsuite/decimal/make-decimal.cc b/libstdc++-v3/testsuite/decimal/make-decimal.cc index 42a608a..b5aafa2 100644 --- a/libstdc++-v3/testsuite/decimal/make-decimal.cc +++ b/libstdc++-v3/testsuite/decimal/make-decimal.cc @@ -16,6 +16,7 @@ // . // { dg-require-effective-target dfp } +// { dg-options "-Wno-pedantic" } // ISO/IEC TR 24733 3.2.5 Initialization from coefficient and exponent. diff --git a/libstdc++-v3/testsuite/experimental/type_traits/value.cc b/libstdc++-v3/testsuite/experimental/type_traits/value.cc index 5bbdab4..16b63cb 100644 --- a/libstdc++-v3/testsuite/experimental/type_traits/value.cc +++ b/libstdc++-v3/testsuite/experimental/type_traits/value.cc @@ -323,23 +323,23 @@ static_assert(is_convertible_v static_assert(!is_convertible_v && !is_convertible::value, ""); -static_assert(negation_v); -static_assert(!negation_v); -static_assert(conjunction_v<>); -static_assert(!disjunction_v<>); -static_assert(conjunction_v); -static_assert(!conjunction_v); -static_assert(disjunction_v); -static_assert(!disjunction_v); -static_assert(conjunction_v); -static_assert(!conjunction_v); -static_assert(disjunction_v); -static_assert(!disjunction_v); +static_assert(negation_v, ""); +static_assert(!negation_v, ""); +static_assert(conjunction_v<>, ""); +static_assert(!disjunction_v<>, ""); +static_assert(conjunction_v, ""); +static_assert(!conjunction_v, ""); +static_assert(disjunction_v, ""); +static_assert(!disjunction_v, ""); +static_assert(conjunction_v, ""); +static_assert(!conjunction_v, ""); +static_assert(disjunction_v, ""); +static_assert(!disjunction_v, ""); static_assert(conjunction_v); + true_type>, ""); static_assert(!conjunction_v); + false_type>, ""); static_assert(disjunction_v); + true_type>, ""); static_assert(!disjunction_v); + false_type>, ""); diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h index bf1035e..d6a766d 100644 --- a/libstdc++-v3/testsuite/util/testsuite_common_types.h +++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h @@ -304,8 +304,8 @@ namespace __gnu_test typedef char16_t a14; typedef char32_t a15; # if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128) - typedef __int128 a16; - typedef unsigned __int128 a17; + __extension__ typedef __int128 a16; + __extension__ typedef unsigned __int128 a17; typedef node<_GLIBCXX_TYPELIST_CHAIN17(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, @@ -316,8 +316,8 @@ namespace __gnu_test # endif #else # if !defined(__STRICT_ANSI__) && defined(_GLIBCXX_USE_INT128) - typedef __int128 a14; - typedef unsigned __int128 a15; + __extension__ typedef __int128 a14; + __extension__ typedef unsigned __int128 a15; typedef node<_GLIBCXX_TYPELIST_CHAIN15(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)> type; commit 23c9709fc8bdc2fcc1c29bbf5df927b2da1e608a Author: Jonathan Wakely Date: Sat Apr 16 16:59:23 2016 +0100 Don't include internal header in libstdc++ tests * testsuite/experimental/type_erased_allocator/1.cc: Don't include internal header. * testsuite/experimental/type_erased_allocator/1_neg.cc: Likewise. * testsuite/experimental/type_erased_allocator/2.cc: Likewise. * testsuite/experimental/type_erased_allocator/uses_allocator.cc: Likewise. Add licence and change to compile-only test. diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc index c000e696..924d728 100644 --- a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc +++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc index 55c446e..ce45dbf 100644 --- a/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc +++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/1_neg.cc @@ -19,7 +19,6 @@ // . #include -#include #include #include diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc index fb927dc..8f7d0b5 100644 --- a/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc +++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/2.cc @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc index fc8acf1..1d4ba1e 100644 --- a/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc +++ b/libstdc++-v3/testsuite/experimental/type_erased_allocator/uses_allocator.cc @@ -1,7 +1,26 @@ -#include +// Copyright (C) 2015-2016 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++14" } +// { dg-do compile } + #include -#include #include +#include using std::vector; using std::allocator; @@ -11,12 +30,5 @@ struct A { using allocator_type = std::experimental::erased_type; }; -void test01() { - static_assert(uses_allocator, allocator>()); - static_assert(uses_allocator>()); -} - -int main() { - test01(); - return 0; -} +static_assert(uses_allocator, allocator>(), ""); +static_assert(uses_allocator>(), ""); commit b678ae09bd9e1592c23b0439fa5b0bd7a32afb4d Author: Jonathan Wakely Date: Mon Apr 18 15:10:42 2016 +0100 Add attribute((unused)) in libstdc++ headers * include/bits/locale_facets.h (ctype::do_narrow): Add attribute to unused parameter. * include/bits/regex_automaton.h (_NFA::_M_insert_alt): Likewise. diff --git a/libstdc++-v3/include/bits/locale_facets.h b/libstdc++-v3/include/bits/locale_facets.h index e3e206b..eda07b6 100644 --- a/libstdc++-v3/include/bits/locale_facets.h +++ b/libstdc++-v3/include/bits/locale_facets.h @@ -1128,7 +1128,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @return The converted char. */ virtual char - do_narrow(char_type __c, char __dfault) const + do_narrow(char_type __c, char __dfault __attribute__((__unused__))) const { return __c; } /** @@ -1155,7 +1155,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, - char __dfault, char* __to) const + char __dfault __attribute__((__unused__)), char* __to) const { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; diff --git a/libstdc++-v3/include/bits/regex_automaton.h b/libstdc++-v3/include/bits/regex_automaton.h index 07158c4..c29fbd9 100644 --- a/libstdc++-v3/include/bits/regex_automaton.h +++ b/libstdc++-v3/include/bits/regex_automaton.h @@ -241,7 +241,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } _StateIdT - _M_insert_alt(_StateIdT __next, _StateIdT __alt, bool __neg) + _M_insert_alt(_StateIdT __next, _StateIdT __alt, + bool __neg __attribute__((__unused__))) { _StateT __tmp(_S_opcode_alternative); // It labels every quantifier to make greedy comparison easier in BFS commit 7f25e8313217c20946601319b39b0a2e52fe5a4d Author: Jonathan Wakely Date: Sat Apr 16 14:49:54 2016 +0100 Avoid -Wsign-compare warnings in std::to_string() * include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare warnings. diff --git a/libstdc++-v3/include/ext/string_conversions.h b/libstdc++-v3/include/ext/string_conversions.h index 8a8fec1..0a0036d 100644 --- a/libstdc++-v3/include/ext/string_conversions.h +++ b/libstdc++-v3/include/ext/string_conversions.h @@ -65,14 +65,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION int _M_errno; } const __save_errno; + struct _Range_chk { + static bool + _S_chk(_TRet, std::false_type) { return false; } + + static bool + _S_chk(_TRet __val, std::true_type) // only called when _Ret is int + { + return __val < _TRet(__numeric_traits::__min) + || __val > _TRet(__numeric_traits::__max); + } + }; + const _TRet __tmp = __convf(__str, &__endptr, __base...); if (__endptr == __str) std::__throw_invalid_argument(__name); else if (errno == ERANGE - || (std::__are_same<_Ret, int>::__value - && (__tmp < __numeric_traits::__min - || __tmp > __numeric_traits::__max))) + || _Range_chk::_S_chk(__tmp, std::is_same<_Ret, int>{})) std::__throw_out_of_range(__name); else __ret = __tmp;