Excerpts from David Malcolm's message of Mai 24, 2022 3:15 pm:
> On Tue, 2022-05-24 at 14:56 +0200, Iain Buclaw wrote:
>> Excerpts from David Malcolm via Gcc-patches's message of Mai 23, 2022
>> 9:28 pm:
>> > gcc/d/ChangeLog:
>> >         * decl.cc: Add "final" and "override" to all "visit" vfunc
>> > decls
>> >         as appropriate.
>> >         * expr.cc: Likewise.
>> >         * toir.cc: Likewise.
>> >         * typeinfo.cc: Likewise.
>> >         * types.cc: Likewise.
>> > 
>> > Signed-off-by: David Malcolm <dmalc...@redhat.com>
>> 
>> 
>> Thanks David!
>> 
>> Looks OK to me.
>> 
>> Iain.
> 
> Thanks; I've pushed it to trunk as r13-736-g442cf0977a2993.
> 
> FWIW, to repeat something I said in the cover letter, I tried hacking -
> Werror=suggest-override into the Makefile whilst I was creating the
> patches, and IIRC there were a bunch of them in the gcc/d/dmd
> subdirectory - but that code is copied from the D community upstream,
> right?
> So maybe if that D parser C++ code requires a C++11 compiler, perhaps
> they might want to add "final" and "override" specifiers to it as
> appropriate, to better document the intent of the decls?
> 

The D parser code is written in D, but most of it is marked
"extern(C++)" so that the code generator can interface with it.  It is
already a hard requirement in D that all overriden method have the
"override" keyword, and "final" is already tacked on most places, so for
the most part it is already there, just hasn't been mirrored to the C++
interfaces in the headers.

I'll have a look into it.

Iain.

Reply via email to