On 10 December 2011 04:15, Divyesh wrote: > > But it is interesting to see that g++ does compile this sample of code > > So I am confused now as there are inconsistencies between gcc and g++ It's not inconsistent. G++ treats the file as C++ code by default, and your program is valid in C++, but not in C.