diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 13:01:07 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 13:01:07 +0000 |
commit | f7481a38a55dc74533df92ce4ae4d8c401c0d3fb (patch) | |
tree | 098473a5e47938dcfa8b53ff687d42c7e5548626 /gcc/ada/sem_prag.adb | |
parent | e10ece15713783d70e450b5c28d1b24eebd10764 (diff) | |
download | ppe42-gcc-f7481a38a55dc74533df92ce4ae4d8c401c0d3fb.tar.gz ppe42-gcc-f7481a38a55dc74533df92ce4ae4d8c401c0d3fb.zip |
2010-06-14 Robert Dewar <dewar@adacore.com>
* ali.adb (Scan_ALI): Implement reading and storing of N lines
(Known_ALI_Lines): Add entry for 'N' (notes)
* ali.ads (Notes): New table to store Notes information
* alloc.ads: Add entries for Notes table
* lib-util.adb (Write_Info_Int): New procedure
(Write_Info_Slit): New procedure
(Write_Info_Uint): New procedure
* lib-util.ads (Write_Info_Int): New procedure
(Write_Info_Slit): New procedure
(Write_Info_Uint): New procedure
* lib-writ.adb (Write_Unit_Information): Output N (notes) lines
* lib-writ.ads: Update documentation for N (Notes) lines
* lib.adb (Store_Note): New procedure
* lib.ads (Notes): New table
(Store_Note): New procedure
* sem_prag.adb: Call Store_Note for affected pragmas
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_prag.adb')
-rw-r--r-- | gcc/ada/sem_prag.adb | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 4f2a8ec3461..065be11833a 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -376,10 +376,6 @@ package body Sem_Prag is -- Any_Integer is OK). If not, given error and raise Pragma_Exit. If -- Typ is left Empty, then any static expression is allowed. - procedure Check_Arg_Is_String_Literal (Arg : Node_Id); - -- Check the specified argument Arg to make sure that it is a string - -- literal. If not give error and raise Pragma_Exit - procedure Check_Arg_Is_Task_Dispatching_Policy (Arg : Node_Id); -- Check the specified argument Arg to make sure that it is a valid task -- dispatching policy name. If not give error and raise Pragma_Exit. @@ -1014,19 +1010,6 @@ package body Sem_Prag is end if; end Check_Arg_Is_Static_Expression; - --------------------------------- - -- Check_Arg_Is_String_Literal -- - --------------------------------- - - procedure Check_Arg_Is_String_Literal (Arg : Node_Id) is - Argx : constant Node_Id := Get_Pragma_Arg (Arg); - begin - if Nkind (Argx) /= N_String_Literal then - Error_Pragma_Arg - ("argument for pragma% must be string literal", Argx); - end if; - end Check_Arg_Is_String_Literal; - ------------------------------------------ -- Check_Arg_Is_Task_Dispatching_Policy -- ------------------------------------------ @@ -5244,6 +5227,8 @@ package body Sem_Prag is GNAT_Pragma; Check_At_Least_N_Arguments (1); Check_Arg_Is_Identifier (Arg1); + Check_No_Identifiers; + Store_Note (N); declare Arg : Node_Id; @@ -7573,6 +7558,7 @@ package body Sem_Prag is Check_Arg_Count (1); Check_No_Identifiers; Check_Arg_Is_Static_Expression (Arg1, Standard_String); + Store_Note (N); -- For pragma Ident, preserve DEC compatibility by requiring the -- pragma to appear in a declarative part or package spec. @@ -11184,7 +11170,8 @@ package body Sem_Prag is GNAT_Pragma; Check_Arg_Count (1); Check_Optional_Identifier (Arg1, Name_Subtitle); - Check_Arg_Is_String_Literal (Arg1); + Check_Arg_Is_Static_Expression (Arg1, Standard_String); + Store_Note (N); -------------- -- Suppress -- @@ -11562,10 +11549,11 @@ package body Sem_Prag is begin GNAT_Pragma; Gather_Associations (Names, Args); + Store_Note (N); for J in 1 .. 2 loop if Present (Args (J)) then - Check_Arg_Is_String_Literal (Args (J)); + Check_Arg_Is_Static_Expression (Args (J), Standard_String); end if; end loop; end Title; |