aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/par-ch13.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/par-ch13.adb')
-rw-r--r--gcc/ada/par-ch13.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/par-ch13.adb b/gcc/ada/par-ch13.adb
index 9526e32..79d9098 100644
--- a/gcc/ada/par-ch13.adb
+++ b/gcc/ada/par-ch13.adb
@@ -221,7 +221,14 @@ package body Ch13 is
if Token = Tok_Identifier then
Attr_Name := Token_Name;
- if not Is_Attribute_Name (Attr_Name) then
+ -- Note that the parser must complain in case of an internal
+ -- attribute names that comes from source since internal names
+ -- are meant to be used only by the compiler.
+
+ if not Is_Attribute_Name (Attr_Name)
+ or else (Is_Internal_Attribute_Name (Attr_Name)
+ and then Comes_From_Source (Token_Node))
+ then
Signal_Bad_Attribute;
end if;