[Bug c++/96333] New: Regression on concepts constraint checking

2020-07-27 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96333

Bug ID: 96333
   Summary: Regression on concepts constraint checking
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel.falcou at lri dot fr
  Target Milestone: ---

The following code :

https://godbolt.org/z/ah6ssM

exhibits a regression so that not having const& on one of the g overload make
them ambiguous.

g++ 10.1 and clang 10 compiles both version without error.
The workaround to add const& is OK but I think this is not normal behavior.

[Bug c++/88761] New: ICE in tsubst_copy, at cp/pt.c:15478 when chaining lambda calls & fold-expressions

2019-01-08 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88761

Bug ID: 88761
   Summary: ICE in tsubst_copy, at cp/pt.c:15478 when chaining
lambda calls & fold-expressions
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel.falcou at lri dot fr
  Target Milestone: ---

The following code:

https://godbolt.org/z/RFZ_k6

compiles fine on g++ 7.x but fails in all g++ 8.x including trunk with an ICE
in tsubst_copy, at cp/pt.c:15478

Unrolling various fold-expression by hand has no effect, nor does capture of
the variable differently (value, mutable lambda etc...)

[Bug c++/83144] New: ICE using trailing return type and constexpr with GCC 7.X

2017-11-24 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83144

Bug ID: 83144
   Summary: ICE using trailing return type and constexpr with GCC
7.X
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel.falcou at lri dot fr
  Target Milestone: ---

Created attachment 42709
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42709=edit
ICE using trailing return type and constexpr with GCC 7.X

ICE using trailing return type and constexpr with GCC 7.X

This is easily worked-around but clang and g++ 5.4 compile it without issues.

[Bug c++/82297] Link error when templated inherited constructor has default arguments

2017-09-22 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82297

--- Comment #4 from joel falcou  ---
Created attachment 42227
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42227=edit
repro

[Bug c++/82297] New: Link error when templated inherited constructor has default arguments

2017-09-22 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82297

Bug ID: 82297
   Summary: Link error when templated inherited constructor has
default arguments
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel.falcou at lri dot fr
  Target Milestone: ---

The following code:

http://coliru.stacked-crooked.com/a/a2657ad530025420

fails to link on g++ 7.1 and 7.2

Older g++ and current clang accept the code.

[Bug c++/68144] New: operator~ in trailing return type leads to spurrious error

2015-10-29 Thread joel.falcou at lri dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68144

Bug ID: 68144
   Summary: operator~ in trailing return type leads to spurrious
error
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: joel.falcou at lri dot fr
  Target Milestone: ---

THe following code :

#include 

struct bar
{
  template 
  auto operator()(T const& a) const -> decltype(~a) { return ~a; }
};

int main()
{  
  // works
  std::cout << ~1 << std::endl;

  // doesnt work
  bar z;  
  std::cout << z(1) << std::endl;
} 

Fails on g++ 5.2.0 with the following error:

main.cpp: In substitution of 'template decltype (~ a)
bar::operator()(const T&) const [with T = int]':
main.cpp:15:19:   required from here
main.cpp:5:29: error: 'a' was not declared in this scope


Changing -> decltype(~a) to -> decltype(~(a)) fixes this incorrect behavior.

Clang++ currently compiles this code correctly.