* sem_prag.adb (Process_Convention): Move the test for the
entity on which the Convention pragma applies down to also
forbid pragma Convention on enumeration literals reached
through renamings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130155
138bc75d-0d04-0410-961f-
82ee72b054a4
explaining why in general 'Unchecked_Access must be used instead
of 'Access.
+ * sem_prag.adb (Process_Convention): Move the test for the
+ entity on which the Convention pragma applies down to also
+ forbid pragma Convention on enumeration literals reached
+ through renamings.
+
2007-11-10 Samuel Tardieu <sam@rfc1149.net>
* a-tasatt.adb: Revert previous change for this file as it will
Error_Pragma_Arg ("entity name required", Arg2);
end if;
- if Ekind (Entity (Id)) = E_Enumeration_Literal then
- Error_Pragma ("enumeration literal not allowed for pragma%");
- end if;
-
E := Entity (Id);
-- Go to renamed subprogram if present, since convention applies to
("\supply appropriate type for&!", Arg2);
end if;
+ if Ekind (E) = E_Enumeration_Literal then
+ Error_Pragma ("enumeration literal not allowed for pragma%");
+ end if;
+
if Etype (E) = Any_Type
or else Rep_Item_Too_Early (E, N)
then