Commit 72e4357f by Robert Dewar Committed by Geert Bosch

sem_prag.adb: Add processing for pragma External.

	* sem_prag.adb: Add processing for pragma External.

	* snames.ads: Add entry for pragma External.

	* par-prag.adb: Add pragma External.

	* snames.adb: Updated to match snames.ads.

From-SVN: r46167
parent 7bc1c7df
2001-10-10 Robert Dewar <dewar@gnat.com>
* sem_prag.adb: Add processing for pragma External.
* snames.ads: Add entry for pragma External.
* par-prag.adb: Add pragma External.
* snames.adb: Updated to match snames.ads.
2001-10-10 Ed Schonberg <schonber@gnat.com> 2001-10-10 Ed Schonberg <schonber@gnat.com>
* exp_ch4.adb (Expand_N_Allocator): Generate meaningful names for * exp_ch4.adb (Expand_N_Allocator): Generate meaningful names for
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- $Revision: 1.149 $ -- $Revision$
-- -- -- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. -- -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- -- -- --
...@@ -854,6 +854,7 @@ begin ...@@ -854,6 +854,7 @@ begin
Pragma_Export_Procedure | Pragma_Export_Procedure |
Pragma_Export_Valued_Procedure | Pragma_Export_Valued_Procedure |
Pragma_Extend_System | Pragma_Extend_System |
Pragma_External |
Pragma_External_Name_Casing | Pragma_External_Name_Casing |
Pragma_Finalize_Storage_Only | Pragma_Finalize_Storage_Only |
Pragma_Float_Representation | Pragma_Float_Representation |
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- $Revision: 1.558 $ -- $Revision$
-- -- -- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- -- -- --
...@@ -5256,6 +5256,30 @@ package body Sem_Prag is ...@@ -5256,6 +5256,30 @@ package body Sem_Prag is
Check_Arg_Is_One_Of (Arg1, Name_On, Name_Off); Check_Arg_Is_One_Of (Arg1, Name_On, Name_Off);
Extensions_Allowed := (Chars (Expression (Arg1)) = Name_On); Extensions_Allowed := (Chars (Expression (Arg1)) = Name_On);
--------------
-- External --
--------------
-- pragma External (
-- [ Convention =>] convention_IDENTIFIER,
-- [ Entity =>] local_NAME
-- [, [External_Name =>] static_string_EXPRESSION ]
-- [, [Link_Name =>] static_string_EXPRESSION ]);
when Pragma_External => External : declare
C : Convention_Id;
Def_Id : Entity_Id;
begin
GNAT_Pragma;
Check_At_Least_N_Arguments (2);
Check_At_Most_N_Arguments (4);
Process_Convention (C, Def_Id);
Note_Possible_Modification (Expression (Arg2));
Process_Interface_Name (Def_Id, Arg3, Arg4);
Set_Exported (Def_Id, Arg2);
end External;
-------------------------- --------------------------
-- External_Name_Casing -- -- External_Name_Casing --
-------------------------- --------------------------
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- $Revision: 1.205 $ -- -- $Revision$ --
-- -- -- --
-- Copyright (C) 1992-2001, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2001, Free Software Foundation, Inc. --
-- -- -- --
...@@ -204,6 +204,7 @@ package body Snames is ...@@ -204,6 +204,7 @@ package body Snames is
"export_object#" & "export_object#" &
"export_procedure#" & "export_procedure#" &
"export_valued_procedure#" & "export_valued_procedure#" &
"external#" &
"finalize_storage_only#" & "finalize_storage_only#" &
"ident#" & "ident#" &
"import#" & "import#" &
...@@ -289,7 +290,6 @@ package body Snames is ...@@ -289,7 +290,6 @@ package body Snames is
"dot_replacement#" & "dot_replacement#" &
"dynamic#" & "dynamic#" &
"entity#" & "entity#" &
"external#" &
"external_name#" & "external_name#" &
"first_optional_parameter#" & "first_optional_parameter#" &
"form#" & "form#" &
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment