Re: "export" keyword is used as a method name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux