aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:19:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:19:56 +0200
commitd48f3dca79fe7cd124c90d33dcc88b2147e23856 (patch)
tree1d5c645601721230be583f9182a5db021543e450 /gcc/ada/par-ch4.adb
parent22a83cea153e34e826ed42afd56334be89a9ad8e (diff)
downloadgcc-d48f3dca79fe7cd124c90d33dcc88b2147e23856.zip
gcc-d48f3dca79fe7cd124c90d33dcc88b2147e23856.tar.gz
gcc-d48f3dca79fe7cd124c90d33dcc88b2147e23856.tar.bz2
[multiple changes]
2012-07-09 Ed Schonberg <schonberg@adacore.com> * sem_ch13.adb: Extend previous change to elementary types. 2012-07-09 Javier Miranda <miranda@adacore.com> * exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration): Reverse previous patch since unconditionally handling as renaming_as_body renamings of predefined dispatching equality and unequality operator cause visibility problems with private overridings of the equality operator (see ACATS C854001). 2012-07-09 Vincent Pucci <pucci@adacore.com> * exp_attr.adb (Signal_Bad_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * par-ch13.adb (P_Representation_Clause): Complain if an internal attribute name that comes from source occurs. * par-ch4.adb (P_Name): Complain if an internal attribute name occurs in the context of an attribute reference. * par-util.adb (Signal_Bad_Attribute): Don't complain about mispelling attribute with internal attributes. * sem_attr.adb (Analyze_Attribute): Raise Program_Error in case of internal attribute names (already rejected by the parser). * snames.adb-tmpl (Is_Internal_Attribute_Name): New routine. * snames.ads-tmpl: Attributes CPU, Dispatching_Domain and Interrupt_Priority are marked as INT attributes since they don't denote real attribute and are only used internally in the compiler. (Is_Internal_Attribute_Name): New routine. From-SVN: r189378
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r--gcc/ada/par-ch4.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb
index 79aa85f..f16d828 100644
--- a/gcc/ada/par-ch4.adb
+++ b/gcc/ada/par-ch4.adb
@@ -434,7 +434,12 @@ package body Ch4 is
elsif Token = Tok_Identifier then
Attr_Name := Token_Name;
- if not Is_Attribute_Name (Attr_Name) then
+ -- Note that internal attributes names don't denote real
+ -- attribute.
+
+ if not Is_Attribute_Name (Attr_Name)
+ or else Is_Internal_Attribute_Name (Attr_Name)
+ then
if Apostrophe_Should_Be_Semicolon then
Expr_Form := EF_Name;
return Name_Node;