Re: GCC 4.1.0 compile error

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

 



"Pranabesh Dash" <pranabesh.dash@xxxxxxxxx> writes:

> The following piece of code compiles fine with 3.4.2, 4.0.0 but
> errors out on 4.1.0. Seems like a GCC bug. The friend function name
> is recognized if called as a function but does not work when used as
> a function pointer. An explicit function declaration (or definition
> reordered) is needed to get it to compile with 4.1.0.
>
> Do you believe this is a bug or a feature???

This is a feature.  It is caused by closer conformance to the C++
standard.  See the -ffriend-injection option and see "ARM-style
name-injection" in http://gcc.gnu.org/gcc-4.1/changes.html.

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