public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
@ 2021-04-09 8:34 marxin at gcc dot gnu.org
2021-04-09 8:35 ` [Bug c++/99985] " marxin at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-09 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
Bug ID: 99985
Summary: [11 Regression] bits/hashtable.h:483:9: error: body of
‘constexpr’ function ... not a return-statement since
g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
I noticed that in botan, inkscape and mariadb packages:
$ cat oid.C
#include <string>
#include <unordered_map>
struct OID {};
std::unordered_map< std::string, OID > load_str2oid_map() {
return std::unordered_map< std::string, OID >{};
}
$ cat oid.C
#include <string>
#include <unordered_map>
struct OID {};
std::unordered_map< std::string, OID > load_str2oid_map() {
return std::unordered_map< std::string, OID >{};
}
$ g++ oid.C -c -std=c++11
In file included from /home/marxin/bin/gcc/include/c++/11.0.1/unordered_map:46,
from oid.C:2:
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h: In instantiation of
‘static constexpr bool std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey,
_Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_S_nothrow_move()
[with bool _No_realloc = true; _Key = std::__cxx11::basic_string<char>; _Value
= std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’:
oid.C:5:49: recursively required from ‘std::unordered_map<_Key, _Tp, _Hash,
_Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc>&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = OID; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _Pred =
std::equal_to<std::__cxx11::basic_string<char> >; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >]’
oid.C:5:49: required from here
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h:483:9: error: body of
‘constexpr’ function ‘static constexpr bool std::_Hashtable<_Key, _Value,
_Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy,
_Traits>::_S_nothrow_move() [with bool _No_realloc = true; _Key =
std::__cxx11::basic_string<char>; _Value = std::pair<const
std::__cxx11::basic_string<char>, OID>; _Alloc = std::allocator<std::pair<const
std::__cxx11::basic_string<char>, OID> >; _ExtractKey =
std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’ not a return-statement
483 | }
| ^
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h: In instantiation of
‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash,
_Unused, _RehashPolicy, _Traits>::_Hashtable(std::_Hashtable<_Key, _Value,
_Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy,
_Traits>&&) [with _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’:
oid.C:5:49: recursively required from ‘std::unordered_map<_Key, _Tp, _Hash,
_Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred,
_Alloc>&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = OID; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _Pred =
std::equal_to<std::__cxx11::basic_string<char> >; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >]’
oid.C:5:49: required from here
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h:520:33: error: ‘static
constexpr bool std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_S_nothrow_move() [with
bool _No_realloc = true; _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’ called in a constant
expression
520 | noexcept(_S_nothrow_move())
| ~~~~~~~~~~~~~~~^~
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h:477:9: note: ‘static
constexpr bool std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_S_nothrow_move() [with
bool _No_realloc = true; _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’ is not usable as a
‘constexpr’ function because:
477 | _S_nothrow_move()
| ^~~~~~~~~~~~~~~
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h: In instantiation of
‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash,
_Unused, _RehashPolicy, _Traits>::_Hashtable(std::_Hashtable<_Key, _Value,
_Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy,
_Traits>&&, std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash,
_RangeHash, _Unused, _RehashPolicy, _Traits>::__node_alloc_type&&,
std::true_type) [with _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>; std::_Hashtable<_Key,
_Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy,
_Traits>::__node_alloc_type = std::_Hashtable<std::__cxx11::basic_string<char>,
std::pair<const std::__cxx11::basic_string<char>, OID>,
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >,
std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char> >,
std::hash<std::__cxx11::basic_string<char> >,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true,
false, true> >::__node_alloc_type; std::true_type =
std::integral_constant<bool, true>]’:
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h:522:17: required
from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash,
_RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable(std::_Hashtable<_Key,
_Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy,
_Traits>&&) [with _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’
/home/marxin/bin/gcc/include/c++/11.0.1/bits/unordered_map.h:184:7: required
from here
/home/marxin/bin/gcc/include/c++/11.0.1/bits/hashtable.h:487:33: error: ‘static
constexpr bool std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_S_nothrow_move() [with
bool _No_realloc = true; _Key = std::__cxx11::basic_string<char>; _Value =
std::pair<const std::__cxx11::basic_string<char>, OID>; _Alloc =
std::allocator<std::pair<const std::__cxx11::basic_string<char>, OID> >;
_ExtractKey = std::__detail::_Select1st; _Equal =
std::equal_to<std::__cxx11::basic_string<char> >; _Hash =
std::hash<std::__cxx11::basic_string<char> >; _RangeHash =
std::__detail::_Mod_range_hashing; _Unused =
std::__detail::_Default_ranged_hash; _RehashPolicy =
std::__detail::_Prime_rehash_policy; _Traits =
std::__detail::_Hashtable_traits<true, false, true>]’ called in a constant
expression
487 | noexcept(_S_nothrow_move());
| ~~~~~~~~~~~~~~~^~
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
@ 2021-04-09 8:35 ` marxin at gcc dot gnu.org
2021-04-09 10:06 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-09 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |redi at gcc dot gnu.org
Priority|P3 |P1
Known to fail| |11.0
Known to work| |10.2.0
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
2021-04-09 8:35 ` [Bug c++/99985] " marxin at gcc dot gnu.org
@ 2021-04-09 10:06 ` jakub at gcc dot gnu.org
2021-04-09 10:21 ` [Bug c++/99985] [10/11 " redi at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-09 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So do we need
#if __cplusplus < 201402L
return _No_realloc
&& is_nothrow_copy_constructible<_Hash>()
&& is_nothrow_copy_constructible<_Equal>();
#else
if _GLIBCXX17_CONSTEXPR (_No_realloc)
if _GLIBCXX17_CONSTEXPR (is_nothrow_copy_constructible<_Hash>())
return is_nothrow_copy_constructible<_Equal>();
#endif
?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
2021-04-09 8:35 ` [Bug c++/99985] " marxin at gcc dot gnu.org
2021-04-09 10:06 ` jakub at gcc dot gnu.org
@ 2021-04-09 10:21 ` redi at gcc dot gnu.org
2021-04-09 10:24 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-09 10:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11 Regression] |[10/11 Regression]
|bits/hashtable.h:483:9: |bits/hashtable.h:483:9:
|error: body of ‘constexpr’ |error: body of ‘constexpr’
|function ... not a |function ... not a
|return-statement since |return-statement since
|g:1cbba49e3417d9b0661e70301 |g:1cbba49e3417d9b0661e70301
|d6fb7a7f52fd360 |d6fb7a7f52fd360
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Last reconfirmed| |2021-04-09
Status|UNCONFIRMED |ASSIGNED
Target Milestone|11.0 |10.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-09 10:21 ` [Bug c++/99985] [10/11 " redi at gcc dot gnu.org
@ 2021-04-09 10:24 ` redi at gcc dot gnu.org
2021-04-09 10:27 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-09 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Aside: is there a good reason those packages use -std=c++11? Did they just add
it ten years ago to enable "new" C++ features? Because now they're *disabling*
features by not using the compiler's default -std mode. I see -std=c++0x or
-std=c++11 in the build for lots of fedora packages.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-04-09 10:24 ` redi at gcc dot gnu.org
@ 2021-04-09 10:27 ` jakub at gcc dot gnu.org
2021-04-09 10:29 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-09 10:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Bet they want C++11 or newer and aren't aware there could be compilers that
would default to C++14, C++17 or C++20...
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/99985] [10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-04-09 10:27 ` jakub at gcc dot gnu.org
@ 2021-04-09 10:29 ` redi at gcc dot gnu.org
2021-04-09 12:09 ` [Bug libstdc++/99985] [9/10/11 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-09 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We can still make it short circuit (and so not instantiate class templates
unnecessarily) like this:
#if __cplusplus <= 201402L
return __and_<__bool_constant<_No_realloc>,
is_nothrow_copy_constructible<_Hash>,
is_nothrow_copy_constructible<_Equal>>::value;
#else
if constexpr (_No_realloc)
if constexpr (is_nothrow_copy_constructible<_Hash>())
return is_nothrow_copy_constructible<_Equal>();
return false;
#endif
I didn't use __and_<> because that has to be instantiated too (although it's
cheaper than the is_xxx_constructible ones), and for C++17 the if-constexpr
version avoids that. But if we need a #if to work for C++11 anyway, we might as
well use __and_ for C++11 and C++14, and if-constexpr for everything later.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/99985] [9/10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2021-04-09 10:29 ` redi at gcc dot gnu.org
@ 2021-04-09 12:09 ` cvs-commit at gcc dot gnu.org
2021-04-09 15:15 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-09 12:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:40ccb47b505b528244ee305923681c0ae3b6f4d5
commit r11-8085-g40ccb47b505b528244ee305923681c0ae3b6f4d5
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Apr 9 12:05:39 2021 +0100
libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985]
I keep forgetting that a constexpr function in C++11 has to be a single
return statement.
libstdc++-v3/ChangeLog:
PR libstdc++/99985
* include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
to be a valid constexpr function in C++11.
* testsuite/23_containers/unordered_set/cons/99985.cc: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/99985] [9/10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2021-04-09 12:09 ` [Bug libstdc++/99985] [9/10/11 " cvs-commit at gcc dot gnu.org
@ 2021-04-09 15:15 ` cvs-commit at gcc dot gnu.org
2021-04-09 16:42 ` cvs-commit at gcc dot gnu.org
2021-04-09 16:42 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-09 15:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:637418ec2c6f559d4fac074db3bafc34a728484b
commit r10-9679-g637418ec2c6f559d4fac074db3bafc34a728484b
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Apr 9 12:05:39 2021 +0100
libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985]
I keep forgetting that a constexpr function in C++11 has to be a single
return statement.
libstdc++-v3/ChangeLog:
PR libstdc++/99985
* include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
to be a valid constexpr function in C++11.
* testsuite/23_containers/unordered_set/cons/99985.cc: New test.
(cherry picked from commit 40ccb47b505b528244ee305923681c0ae3b6f4d5)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/99985] [9/10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (7 preceding siblings ...)
2021-04-09 15:15 ` cvs-commit at gcc dot gnu.org
@ 2021-04-09 16:42 ` cvs-commit at gcc dot gnu.org
2021-04-09 16:42 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-09 16:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:6b66d162835621c81a78f361416149d914d31de8
commit r9-9335-g6b66d162835621c81a78f361416149d914d31de8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Apr 9 12:05:39 2021 +0100
libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985]
I keep forgetting that a constexpr function in C++11 has to be a single
return statement.
libstdc++-v3/ChangeLog:
PR libstdc++/99985
* include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
to be a valid constexpr function in C++11.
* testsuite/23_containers/unordered_set/cons/99985.cc: New test.
(cherry picked from commit 40ccb47b505b528244ee305923681c0ae3b6f4d5)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/99985] [9/10/11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
` (8 preceding siblings ...)
2021-04-09 16:42 ` cvs-commit at gcc dot gnu.org
@ 2021-04-09 16:42 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-09 16:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99985
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Should be fixed everywhere.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-04-09 16:42 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 8:34 [Bug c++/99985] New: [11 Regression] bits/hashtable.h:483:9: error: body of ‘constexpr’ function ... not a return-statement since g:1cbba49e3417d9b0661e70301d6fb7a7f52fd360 marxin at gcc dot gnu.org
2021-04-09 8:35 ` [Bug c++/99985] " marxin at gcc dot gnu.org
2021-04-09 10:06 ` jakub at gcc dot gnu.org
2021-04-09 10:21 ` [Bug c++/99985] [10/11 " redi at gcc dot gnu.org
2021-04-09 10:24 ` redi at gcc dot gnu.org
2021-04-09 10:27 ` jakub at gcc dot gnu.org
2021-04-09 10:29 ` redi at gcc dot gnu.org
2021-04-09 12:09 ` [Bug libstdc++/99985] [9/10/11 " cvs-commit at gcc dot gnu.org
2021-04-09 15:15 ` cvs-commit at gcc dot gnu.org
2021-04-09 16:42 ` cvs-commit at gcc dot gnu.org
2021-04-09 16:42 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).