summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_attr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-06 15:08:57 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-06 15:08:57 +0000
commita79db2128caf19bc6aa01a90917eef6119a57981 (patch)
tree818ba69ac8fa94ec7b09ad931f8d3114dbc0ed96 /gcc/ada/sem_attr.adb
parentb3c7348721a70eb72eedb1416615316a0d582283 (diff)
downloadgcc-a79db2128caf19bc6aa01a90917eef6119a57981.tar.gz
2009-05-06 Robert Dewar <dewar@adacore.com>
* sinput.adb (Expr_Last_Char): Fix some copy-paste errors for paren skipping. (Expr_First_Char): Add ??? comment that paren skipping needs work (Expr_Last_Char): Add ??? comment that paren skipping needs work * exp_attr.adb: Add processing for Compiler_Version * sem_attr.adb: New attribute Compiler_Version * snames.ads-tmpl: Add entries for Compiler_Version attribute * gnat_rm.texi: Document Compiler_Version attribute git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147181 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_attr.adb')
-rw-r--r--gcc/ada/sem_attr.adb12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 3a123d9985e..972019fcc0d 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -35,6 +35,7 @@ with Exp_Dist; use Exp_Dist;
with Exp_Util; use Exp_Util;
with Expander; use Expander;
with Freeze; use Freeze;
+with Gnatvsn; use Gnatvsn;
with Itypes; use Itypes;
with Lib; use Lib;
with Lib.Xref; use Lib.Xref;
@@ -2544,6 +2545,16 @@ package body Sem_Attr is
Set_Etype (N, RTE (RE_Address));
+ ----------------------
+ -- Compiler_Version --
+ ----------------------
+
+ when Attribute_Compiler_Version =>
+ Check_E0;
+ Check_Standard_Prefix;
+ Rewrite (N, Make_String_Literal (Loc, Gnat_Static_Version_String));
+ Analyze_And_Resolve (N, Standard_String);
+
--------------------
-- Component_Size --
--------------------
@@ -7482,6 +7493,7 @@ package body Sem_Attr is
Attribute_Caller |
Attribute_Class |
Attribute_Code_Address |
+ Attribute_Compiler_Version |
Attribute_Count |
Attribute_Default_Bit_Order |
Attribute_Elaborated |