[Bug c++/92032] DR 1601 - Promotion of enumeration with fixed underlying type

2021-07-27 Thread charlie at charliedyson dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92032 Charlie changed: What|Removed |Added CC||charlie at charliedyson dot net --- Comment

[Bug libstdc++/94805] New: variant hash algorithm is collision-prone

2020-04-27 Thread charlie at charliedyson dot net
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net Target Milestone: --- The hash implementation for std::variant appears to be "index + hash(contained_value)". This leads to collisions when working with numeric types (e.g. a

[Bug c++/66717] In variable declaration, decltype incorrectly deduces return type of function returning const reference to int

2015-07-01 Thread charlie at charliedyson dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66717 --- Comment #2 from Charlie --- I think you may be right that it's only the diagnostic that's wrong. The following compiles fine https://goo.gl/eyuv17 static int foo = 1; decltype (const_ref_to_int ()) x = foo; static_assert (std::is_same(

[Bug c++/66717] New: In variable declaration, decltype incorrectly deduces return type of function returning const reference to int

2015-07-01 Thread charlie at charliedyson dot net
Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net Target Milestone: --- Applying decltype to a function returning const int & appear

[Bug c++/65354] Converting lambda to pointer results in double destruction

2015-03-09 Thread charlie at charliedyson dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65354 --- Comment #2 from Charlie --- Here's a more succinct example (using the "+" trick to convert to a function pointer): #include int main () { auto f = +[] (std::string s) { return std::string (std::move (s)); }; std::stri

[Bug c++/65354] New: Converting lambda to pointer results in double destruction

2015-03-08 Thread charlie at charliedyson dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net In the following, the unique_ptr is deleted twice if the lambda is converted to a function pointer (#if 1) but runs without error if left as a lambda. Compiled

[Bug c++/64429] New: Double free when returning std::string from trivial lambda

2014-12-28 Thread charlie at charliedyson dot net
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net The following causes a double free on gcc 4.8.2 as shipped with Ubuntu, and various other versions I tested on Wandbox. Interestingly enough, explicitly copying

[Bug c++/60579] New: Segmentation fault on variadic 'using' within variadic template class

2014-03-19 Thread charlie at charliedyson dot net
ty: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net The following causes a segfault on gcc 4.8.1 and earlier versions: template struct X { template using First = Head; using Y = First;

[Bug c++/57913] New: [C++11] Explicitly defaulted constructor does not respect access specifier

2013-07-16 Thread charlie at charliedyson dot net
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: charlie at charliedyson dot net In particular, the following and similar examples will compile: class X { X() = default; // Should be private }; int main() { X x; } Tested