[Bug c++/61135] It seems to be not able to call virtual method of literal object in lambda expression

2015-04-19 Thread lc289dafd7ybme05se at softbank dot ne.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61135

--- Comment #9 from lc289dafd7ybme05se at softbank dot ne.jp ---
right.
i don't know why, but templateclass is also needed, to invoke the error.


[Bug c++/61135] It seems to be not able to call virtual method of literal object in lambda expression

2015-04-18 Thread lc289dafd7ybme05se at softbank dot ne.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61135

lc289dafd7ybme05se at softbank dot ne.jp changed:

   What|Removed |Added

 CC||lc289dafd7ybme05se@softbank
   ||.ne.jp

--- Comment #6 from lc289dafd7ybme05se at softbank dot ne.jp ---
below also doesn't work
struct A
{
int funcA(){return 0;}
};
templateclass
struct B:virtual public A{
void funcB(){
[a=this-funcA()]{};
}
};

int main()
{
BA b;
b.funcB();
return 0;
}

//g++ 4.9.2
g++ -std=c++14 hd.cpp
hd.cpp: In instantiation of ‘void B template-parameter-1-1 ::funcB() [with
template-parameter-1-1 = A]’:
hd.cpp:15:10:   required from here
hd.cpp:9:2: internal compiler error: in cp_genericize_r, at
cp/cp-gimplify.c:1175
  }
  ^

[Bug c++/61135] It seems to be not able to call virtual method of literal object in lambda expression

2015-04-18 Thread lc289dafd7ybme05se at softbank dot ne.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61135

--- Comment #7 from lc289dafd7ybme05se at softbank dot ne.jp ---
仮想継承の時もエラーになるみたいですね。