+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/18680
+ * sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
+ apply pragma Linker_Section on type.
+
2008-04-14 Samuel Tardieu <sam@rfc1149.net>
PR ada/16098
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
+2008-04-14 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/18680
+ * gnat.dg/specs/linker_section.ads: New.
+
2008-04-14 Samuel Tardieu <sam@rfc1149.net>
PR ada/16098
--- /dev/null
+package Linker_Section is
+ Data1 : constant String := "12345678901234567";
+ pragma Linker_Section (Entity => Data1,
+ Section => ".eeprom");
+ type EEPROM_String is new String;
+ pragma Linker_Section (Entity => EEPROM_String, -- { dg-error "type" }
+ Section => ".eeprom");
+ Data2 : constant EEPROM_String := "12345678901234567";
+end Linker_Section;
+