This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 4.1.0 compile error


"Pranabesh Dash" <pranabesh.dash@gmail.com> 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]