https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95664

Ludovic Brenta <ludo...@ludovic-brenta.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ludo...@ludovic-brenta.org

--- Comment #1 from Ludovic Brenta <ludo...@ludovic-brenta.org> ---
ARM 3.9.3(3/2): A subprogram declared by an abstract_subprogram_declaration
or a formal_abstract_subprogram_declaration is an abstract subprogram.
If it is a primitive subprogram of a tagged type, then the tagged type
shall be abstract.

so this does not explicitly forbid abstract subprograms that are primitive
to an untagged type; however:

7
A call on an abstract subprogram shall be a dispatching call;
nondispatching calls to an abstract subprogram are not allowed.

this implicitly requires the formal type of the controlling operand to be
tagged and the actual to be class-wide.

Therefore I think gcc-9.3 and gcc-10.1 should both report an error; it should
be illegal to declare "=" as an abstract primitive subprogram of the untagged
type Element.

Reply via email to