This is the mail archive of the gcc-bugs@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: default parameters, virtual functions


Nathan Holladay wrote:
I couldn't access bugzilla, because the password reset page I was emailed was giving errors.
I'm not sure if this is a bug (don't have the standard), but it's short:

When a virtual function is called by another member function of the base class, it uses the base class's default parameters, while calling the derived class's actual function. On the other hand, it behaves as expected (i.e., the derived class's default parameters are used), when accessed externally.
it is behaving correctly in both cases. Th edefault args are used from the declaration
that was visible at the call site.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]