[net.lang.ada] Requirement to Implement pragmas?

harbaughs@eglin-vax (05/05/86)

I observe validated compilers not implementing all predefined pragmas
and then I read in LRM section 2.8 (8) "The pragmas defined by the
language are desribed in Annex B: they must be supported by every
implementation."     
   As an example, but not to talk negatively about the product, I cite
from the Alsys PC/AT compiler appendix F:
"pragma shared is currently ignored."
"Some other predefined pragmas are not treated at this time. If used they
are ignored and a warning is issued. These pragmas are CONTROLLED, INLINE,
MEMORY_SIZE, OPTIMIZE, PACK, STORAGE_UNIT, SYSTEM_NAME."
Above quotes are from version 1.0 20 Feb 1986 which I believe is validated.
            
    As a second example, again not to talk negatively about the product, I
cite the VAX Ada LRM:
"VAX Ada does not support pragma SHARED(see VOLATILE)"
"VAX Ada does not support pragma SUPPRESS(see SUPPRESS_ALL)"
--
   It seems that vendors are allowed latitude with pragmas beyond my
interpretation of section 2.8 (8). I don't say that is necessarily
bad, I am just asking for an explanation. Thanks.
regards, sam harbaugh
---------------------
------

stt@ada-uts (05/14/86)

It turns out that most language-defined pragmas have escape
clauses that say an implementation may limit its acceptance
or simply ignore them.  Hence, "supported" does not require
much.

Pragma SHARED seems to be an exception to this,
and I suspect that as soon as the ACVC writers can
figure out how to test for it, it will suddenly be
implemented in all of the validated compilers.

Even pragma SHARED has an escape clause, namely that
it MUST be restricted to objects for which reading
and updating is implemented as an indivisible operation.
An implementation may (presumably) always claim
that they don't implement ANY objects with indivisible
operations, and hence finesse the pragma completely.
Hopefully the market-place will eliminate such skulduggery.