From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!ucbvax!SEI.CMU.EDU!Kenneth.Fowler From: Kenneth.Fowler@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: Ada9X Special Report on Pragmas and Attributes Message-ID: <8908141927.AA26967@ch.sei.cmu.edu> Date: 14 Aug 89 19:27:01 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: A Software Engineering Institute Special Report entitled- "Ada Compiler Pragmas and Attributes, An Implementation-Dependent Study" has recently been completed for the Ada9X Project Office. This task is one of several being conducted as "complex study issues" in preparation for revision to the Ada language. Ada 9X Project team activities at the SEI are led by John Goodenough. John reports directly to Chris Anderson, Ada 9X Project Manager at Eglin AFB, Florida. A recitation of the task directive and study abstract follows: Task Description "Implementation-dependent pragmas and attributes: A variety of implementation-dependent pragmas and attributes have been developed by different compiler vendors. The SEI shall survey all such implementations dependiecies, documented in Appendix F by each vendor, to determine if some of the pragmas and attributes should be added to the Ada language standard in order to improve uniformity among compilers. The product of this task is an Implementation-Dependent Pragmas and Attributes Study Report." Abstract The Ada Language Reference Manual describes an assortment of compiler pragmas and attributes which a validated compiler must support. A compiler may add other pragmas and attributes as long as the legality of the program cannot be influenced. This study examines most of the current offering of the latter group with the goal of identifying new candidates for language definition. Compiler support for language-defined pragmas is first characterized and we show that the level of support varies surprisingly between implementations. Based on trends in the data, we point to specific language rule inconsistencies and to a lack of requisite validation testing as the most probable cause. A change in the LRM is recommended to remedy the problem along with improved conformance checking. The growing body of implementation-defined pragmas is profiled and the largest class (26%) are shown to substitute for pragma INTERFACE. An increase in functionality for INTERFACE is suggested which meets the same user needs and improves overall uniformity between compilers. A variety of implementation-defined pragmas are offered to improve program performance. Some of these pragmas rely on the user to voluntarily give-up certain forms of Ada expression. When usage restrictions are abrogated in the presence of these pragmas undefined behavior may result. As a basic precaution, compilers should warn the user when risk conditions arise in this context. In contrast to pragmas, we found very few implementation-dependent attributes and none which provided a functionality significantly greater than that existing in the language. Attributes thus remain a largely unexplored realm for innovation.