diff options
author | sam <sam@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 13:41:25 +0000 |
---|---|---|
committer | sam <sam@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 13:41:25 +0000 |
commit | cebe3a8ba8feee2632f704c707b317feeb58c891 (patch) | |
tree | a0e5eb6d8c22916e37633735e87dd448b9eccc42 /gcc/ada/sem_prag.adb | |
parent | c2b7e7c4499d0358b56fa31f85b78523bba7b879 (diff) | |
download | gcc-cebe3a8ba8feee2632f704c707b317feeb58c891.tar.gz |
gcc/ada/
PR ada/18680
* sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
apply pragma Linker_Section on type.
gcc/testsuite/
PR ada/18680
* gnat.dg/specs/linker_section.ads: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134266 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 8a9a2e91f11..c238367ba83 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -8450,6 +8450,12 @@ package body Sem_Prag is Check_Arg_Is_Library_Level_Local_Name (Arg1); Check_Arg_Is_Static_Expression (Arg2, Standard_String); + -- This pragma does not apply to types + + if Is_Type (Entity (Expression (Arg1))) then + Error_Pragma_Arg ("pragma% cannot apply to type", Arg1); + end if; + -- The only processing required is to link this item on to the -- list of rep items for the given entity. This is accomplished -- by the call to Rep_Item_Too_Late (when no error is detected |