TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Randy Brukardt <[log in to unmask]>
Fri, 21 Apr 2000 17:17:37 -0500
text/plain (22 lines)
> > Section 9.5.1[1] states:
> >    "protected functions provide concurrent read-only access
> to the data." (in the P.O.)

This is the key to his problem. The next paragraph (9.5.1(2)) says that it
is illegal to write components of a protected object in a protected
function.

His code does so in four places. Thus it is out and out illegal. It doesn't
compile with GNAT, but it does compile with at least one other compiler I
tried. (And presumably the one he is using as well).

Why are compilers missing this error? Part of the reason is that the
paragraph in question (9.5.1(2)) is only tested in the ACATS (validation
suite) with an executable test. Which means that there is no check that
compilers actually detect the error specified in that paragraph. I've added
to the list of things for the ACAA to look at.


                        Randy Brukardt
                        ACAA Technical Agent.

ATOM RSS1 RSS2