When build the following code with GCC 4.8.1: struct C { constexpr int fun (int x) { return x + 1; } int a = 2; int b = fun(a); }; C c; int main() {} GCC told me : internal compiler error : segmentation fault. In my opinion, it should present more meaningful result, such as the non-static function 'fun' cannot be used in inline initialization ...
This one simply works in mainline.
Current clang also accepts it.
I'm adding the testcase and closing the bug as fixed for 4.9.0.
*** Bug 57888 has been marked as a duplicate of this bug. ***