From a97e4e3fb5970d33aa35c3422499dc38879905c0 Mon Sep 17 00:00:00 2001 From: Ed Schonberg Date: Mon, 30 Nov 2009 14:11:59 +0000 Subject: gnat_rm.texi, [...]: Document new syntax for pragma Annotate 2009-11-30 Ed Schonberg * gnat_rm.texi, gnat_ugn.texi: Document new syntax for pragma Annotate From-SVN: r154805 --- gcc/ada/ChangeLog | 4 ++++ gcc/ada/gnat_rm.texi | 15 +++++++++------ gcc/ada/gnat_ugn.texi | 6 +++--- 3 files changed, 16 insertions(+), 9 deletions(-) (limited to 'gcc/ada') diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e5cd72b..a735c07 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2009-11-30 Ed Schonberg + + * gnat_rm.texi, gnat_ugn.texi: Document new syntax for pragma Annotate + 2009-11-30 Robert Dewar * scans.ads (Wide_Wide_Character_Found): New flag diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 7744f15..1c7f64e 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -929,7 +929,7 @@ same syntax and effect. @noindent Syntax: @smallexample @c ada -pragma Annotate (IDENTIFIER @{, ARG@}); +pragma Annotate (IDENTIFIER [,IDENTIFIER] @{, ARG@}); ARG ::= NAME | EXPRESSION @end smallexample @@ -937,11 +937,14 @@ ARG ::= NAME | EXPRESSION @noindent This pragma is used to annotate programs. @var{identifier} identifies the type of annotation. GNAT verifies that it is an identifier, but does -not otherwise analyze it. The @var{arg} argument -can be either a string literal or an -expression. String literals are assumed to be of type -@code{Standard.String}. Names of entities are simply analyzed as entity -names. All other expressions are analyzed as expressions, and must be +not otherwise analyze it. The second optional identifier is also left +unanalyzed, and by convention is used to control the action of the tool to +which the annotation is addressed. The remaining @var{arg} arguments +can be either string literals or more generally expressions. +String literals are assumed to be either of type +@code{Standard.String} or else @code{Wide_String} or @code{Wide_Wide_String} +depending on the character literals they contain. +All other kinds of arguments are analyzed as expressions, and must be unambiguous. The analyzed pragma is retained in the tree, but not otherwise processed diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 87faf97..78bbf56 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21028,7 +21028,7 @@ exemption control annotations is as follows: @group pragma Annotate (gnatcheck, @i{exemption_control}, @i{Rule_Name}, [@i{justification}]); -@i{exemption_control} ::= "Exempt_On" | "Exempt_Off" +@i{exemption_control} ::= Exempt_On | Exempt_Off @i{Rule_Name} ::= string_literal @@ -21052,9 +21052,9 @@ A source code section where an exemption is active for a given rule is delimited by an @code{exempt_on} and @code{exempt_off} annotation pair: @smallexample @c ada -pragma Annotate (gnatcheck, "Exempt_On", Rule_Name, "justification"); +pragma Annotate (gnatcheck, Exempt_On, Rule_Name, "justification"); -- source code section -pragma Annotate (gnatcheck, "Exempt_Off", Rule_Name); +pragma Annotate (gnatcheck, Exempt_Off, Rule_Name); @end smallexample -- cgit v1.1