[Bug c++/97839] New: Template lambda incorrectly requiring the optional lambda-declarator

2020-11-15 Thread gareth--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97839

Bug ID: 97839
   Summary: Template lambda incorrectly requiring the optional
lambda-declarator
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gar...@ignition-web.co.uk
  Target Milestone: ---

int main()
{
[]{}.operator()();
}

https://godbolt.org/z/eo4ebr

http://eel.is/c++draft/expr.prim.lambda.general#nt:lambda-expression

[Bug middle-end/67809] Empty pointer-chasing loops aren't optimized out

2021-06-12 Thread gareth--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67809

Gareth Lloyd  changed:

   What|Removed |Added

 CC||gar...@ignition-web.co.uk

--- Comment #11 from Gareth Lloyd  ---
Looks like as of GCC 10.1 this optimisation exists

This bug can be closed?

[Bug c++/101509] New: Rejects valid construction call with type inference

2021-07-19 Thread gareth--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101509

Bug ID: 101509
   Summary: Rejects valid construction call with type inference
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gar...@ignition-web.co.uk
  Target Milestone: ---

template 
struct S { S(T); };

struct my_type{ my_type(S); };

void foo(S);

void test()
{
my_type(S(1)); // no issue here
my_type(S{1}); // no issue here
auto tmp1 = my_type(S(1)); // no issue here
auto tmp2 = my_type(S{1}); // no issue here
foo(S(1)); // no issue here
foo(S{1}); // no issue here
my_type tmp3(S(1)); // no issue here
my_type tmp4(S{1}); // GCC error
my_type tmp5((S{1})); // no issue here
}

https://godbolt.org/z/jb68o46fP

[Bug c++/101509] Rejects valid construction call with type inference

2021-07-19 Thread gareth--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101509

--- Comment #1 from Gareth Lloyd  ---
This was originally discovered where `S` was `std::vector` and was constructed
with an initializer_list