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

Uriy <yyelle at rbx dot email> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48205|0                           |1
        is obsolete|                            |

--- Comment #4 from Uriy <yyelle at rbx dot email> ---
Created attachment 48206
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48206&action=edit
example code for gcc 9.3.0

Thank you for reply.
Recently I test gcc 9.3.0 and it report some errors in the example code. But I
modify it slightly and it works with no errors.
I think the code is enough clear to see what exact clauses RM are violated. For
example there is conversion from access to constrained to access to
unconstrained type, and the type have a constrained partial view, while
legality rules for conversions requires for such case that any partial view
were unconstrained. There is also assignments of different subtypes (which have
no common values).

It is very sad if compiler makers doesn't understand Ada enough to see what
exact is wrong in this specially example code. And "thousands tests" will
really not help. But I apologise and send corrected code which works against
(currently recent) gcc 9.3.0.

> you can certainly write your own Ada compiler with another implementation.

Yes. But it seems to me that it was more important to say this to you (because
gcc, not my compiler, currently does not provide discussed feature of Ada
language.) In principle it seems to me that the only real problem here is
"errorneous execution" but it can be avoided by some additional bit which will
mark that altering a discriminant is disabled.

P. S. Excuse me, previous comment was somehow sent while not finished (and I
cannot to do anything with it).

Reply via email to