aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/aspects.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 14:06:55 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 14:06:55 +0200
commit5b5b27adff45664299c19f4666e078f4acecfdf7 (patch)
tree01c416110922a7e372c9c428f0077e8b755bd4ee /gcc/ada/aspects.ads
parent053cf9940a4086500ebaa994d29b894e8f5ed71a (diff)
downloadgcc-5b5b27adff45664299c19f4666e078f4acecfdf7.zip
gcc-5b5b27adff45664299c19f4666e078f4acecfdf7.tar.gz
gcc-5b5b27adff45664299c19f4666e078f4acecfdf7.tar.bz2
[multiple changes]
2012-05-15 Thomas Quinot <quinot@adacore.com> * uintp.adb (Image_Uint): Use UI_Div_Rem to get quotient and remainder of U / Base in a single operation. 2012-05-15 Robert Dewar <dewar@adacore.com> * exp_ch5.adb, inline.adb, sem_ch10.adb, prj.ads, sem_util.adb, a-ngelfu.ads, exp_ch4.adb, exp_ch6.adb, aspects.ads, sem_ch6.adb, vms_data.ads, exp_ch3.adb, prj-env.adb: Minor reformatting. From-SVN: r187529
Diffstat (limited to 'gcc/ada/aspects.ads')
-rw-r--r--gcc/ada/aspects.ads41
1 files changed, 23 insertions, 18 deletions
diff --git a/gcc/ada/aspects.ads b/gcc/ada/aspects.ads
index bc5b9c6..7392bee 100644
--- a/gcc/ada/aspects.ads
+++ b/gcc/ada/aspects.ads
@@ -34,30 +34,35 @@
-- aspect specifications from the tree. The semantic processing for aspect
-- specifications is found in Sem_Ch13.Analyze_Aspect_Specifications.
+------------------------
+-- Adding New Aspects --
+------------------------
+
-- In general, each aspect should have a corresponding pragma, so that the
-- newly developed functionality is available for Ada versions < Ada 2012.
-- When both are defined, it is convenient to first transform the aspect into
-- an equivalent pragma in Sem_Ch13.Analyze_Aspect_Specifications, and then
-- analyze the pragma in Sem_Prag.Analyze_Pragma.
--- To add a new aspect:
--- * create a name in snames.ads-tmpl
--- * create a value in type Aspect_Id in this unit
--- * add a value for the aspect in the global arrays defined in this unit
--- * add code for analyzing the aspect in
--- Sem_Ch13.Analyze_Aspect_Specifications. This may involve adding some
--- nodes to the tree to perform additional treatments later.
--- * if the semantic analysis of expressions/names in the aspect should not
--- occur at the point the aspect is defined, add code in the adequate
--- semantic analysis procedure for the aspect. For example, this is the case
--- for aspects Pre and Post on subprograms, which are pre-analyzed at the
--- end of the list of declarations to which the subprogram belongs, and
--- fully analyzed (possibly with expansion) during the semantic analysis of
--- subprogram bodies.
-
--- Additionally, to add a corresponding pragma for a new aspect:
--- * create a name for the pragma in snames.ads-tmpl
--- * add code for analyzing the pragma in Sem_Prag.Analyze_Pragma
+-- To add a new aspect, you need to do the following
+
+-- 1. Create a name in snames.ads-tmpl
+
+-- 2. Create a value in type Aspect_Id in this unit
+
+-- 3. Add a value for the aspect in the global arrays defined in this unit
+
+-- 4. Add code for the aspect in Sem_Ch13.Analyze_Aspect_Specifications.
+-- This may involve adding some nodes to the tree to perform additional
+-- treatments later.
+
+-- 5. Ff the semantic analysis of expressions/names in the aspect should not
+-- occur at the point the aspect is defined, add code in the adequate
+-- semantic analysis procedure for the aspect. For example, this is the
+-- case for aspects Pre and Post on subprograms, which are pre-analyzed
+-- at the end of the declaration list to which the subprogram belongs,
+-- and fully analyzed (possibly with expansion) during the semantic
+-- analysis of subprogram bodies.
with Namet; use Namet;
with Snames; use Snames;