This is the mail archive of the gcc-patches@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: PATCH: Implement __attribute__((final)) for C++, restricting subtyping and overriding


On Fri, Oct 10, 2008 at 2:46 PM, Jeffrey Yasskin <jyasskin@gmail.com> wrote:
> On Fri, Oct 10, 2008 at 1:04 PM, Doug Gregor <doug.gregor@gmail.com> wrote:
>> Does this implement exactly the behavior required for the "final"
>> attribute that just went into C++0x?
>>
>>  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf
>
> I think it implements the same behavior on virtual functions, but may
> be different on classes.

On the other hand, N2761 says, "A class with the final attribute will
not be allowed to be a base class for another class." which conflicts
with the wording it actually added to the standard. I'm submitting a
defect report through Lawrence Crowl, and, given that sentence, I
think the my patch does implement what N2761's authors intended. Does
anyone have any comments/suggestions about the patch?

Thanks,
Jeffrey


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