On 2 December 2016 at 13:10, chenzero wrote: > currently, I am confused because the same code can be compiled in C++Builder > and Visual studio 2008, but not gcc. So read the link, it explains the problem. The code is not valid according to the C++ standard, so GCC is correct, and your older Borland and Visual Studio compilers are wrong.