The following C++ snippet will compile using G++ 4.8.4:
double x = std::abs(x);
It will generate a warning, though:
warning: variable 'x' is uninitialized when used within its own initialization [-Wuninitialized]
Why is that even allowed? Is there any use for such a construct? Or is it compiler-dependent?