Michael Gong <gongweigang@xxxxxxxxx> writes: > When "export" is used as a method name in a class (see example below), > I compiled it using SunStudio C++ compiler with "-compat" option. > > I wonder can g++ compile it and which option to use ? > > Example: > > class A { > void export(); > }; > int main () { return 0; } "export" is a keyword in C++, and has been ever since the C++98 standard. g++ does not have any option to make it not be a keyword. I suppose you could use a hack like -Dexport=myexport. Ian