+2008-04-14 Robert Dewar <dewar@adacore.com>
+
+ * sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
+ to every non-object and change error message.
+
2008-04-14 Robert Dewar <dewar@adacore.com>
* sem_util.ads, sem_util.adb (In_Subprogram): Remove.
Check_Arg_Is_Library_Level_Local_Name (Arg1);
Check_Arg_Is_Static_Expression (Arg2, Standard_String);
- -- This pragma does not apply to types
+ -- This pragma applies only to objects
- if Is_Type (Entity (Expression (Arg1))) then
- Error_Pragma_Arg ("pragma% cannot apply to type", Arg1);
+ if not Is_Object (Entity (Expression (Arg1))) then
+ Error_Pragma_Arg ("pragma% applies only to objects", Arg1);
end if;
-- The only processing required is to link this item on to the
+2008-04-14 Robert Dewar <dewar@adacore.com>
+
+ * gnat.dg/specs/linker_section.ads: Check for more error conditions.
+
2008-04-14 Samuel Tardieu <sam@rfc1149.net>
PR ada/18680
pragma Linker_Section (Entity => Data1,
Section => ".eeprom");
type EEPROM_String is new String;
- pragma Linker_Section (Entity => EEPROM_String, -- { dg-error "type" }
+ pragma Linker_Section (Entity => EEPROM_String, -- { dg-error "objects" }
Section => ".eeprom");
Data2 : constant EEPROM_String := "12345678901234567";
+ package Inner is end;
+ pragma Linker_Section (Entity => Inner, -- { dg-error "objects" }
+ Section => ".eeprom");
end Linker_Section;