Commit d9adb08c by Robert Dewar Committed by Arnaud Charlet

freeze.adb (Freeze_Entity): Remove test of obsolete flag Propagate_Exceptions...

2013-07-05  Robert Dewar  <dewar@adacore.com>

	* freeze.adb (Freeze_Entity): Remove test of obsolete flag
	Propagate_Exceptions, and associated useless code that did
	nothing.
	* gnat_rm.texi: Add documentation for obsolete pragma
	Propagate_Exceptions.
	* opt.ads (Propagate_Exceptions): Obsolete flag removed.
	* sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
	Remove useless and obsolete setting of Propagate_Exceptions flag.

From-SVN: r200698
parent 46729409
2013-07-05 Robert Dewar <dewar@adacore.com> 2013-07-05 Robert Dewar <dewar@adacore.com>
* freeze.adb (Freeze_Entity): Remove test of obsolete flag
Propagate_Exceptions, and associated useless code that did
nothing.
* gnat_rm.texi: Add documentation for obsolete pragma
Propagate_Exceptions.
* opt.ads (Propagate_Exceptions): Obsolete flag removed.
* sem_prag.adb (Analyze_Pragma, case Propagate_Exceptions):
Remove useless and obsolete setting of Propagate_Exceptions flag.
2013-07-05 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi, sem_prag.adb: Minor comment/text fixes. * gnat_rm.texi, sem_prag.adb: Minor comment/text fixes.
2013-07-05 Robert Dewar <dewar@adacore.com> 2013-07-05 Robert Dewar <dewar@adacore.com>
......
...@@ -4940,21 +4940,6 @@ package body Freeze is ...@@ -4940,21 +4940,6 @@ package body Freeze is
and then not Is_Library_Level_Entity (E) and then not Is_Library_Level_Entity (E)
then then
Set_Is_Public (E, False); Set_Is_Public (E, False);
-- If no address clause and not intrinsic, then for imported
-- subprogram in main unit, generate descriptor if we are in
-- Propagate_Exceptions mode.
-- This is very odd code, it makes a null result, why ???
elsif Propagate_Exceptions
and then Is_Imported (E)
and then not Is_Intrinsic_Subprogram (E)
and then Convention (E) /= Convention_Stubbed
then
if Result = No_List then
Result := Empty_List;
end if;
end if; end if;
end if; end if;
......
...@@ -206,6 +206,7 @@ Implementation Defined Pragmas ...@@ -206,6 +206,7 @@ Implementation Defined Pragmas
* Pragma Priority_Specific_Dispatching:: * Pragma Priority_Specific_Dispatching::
* Pragma Profile:: * Pragma Profile::
* Pragma Profile_Warnings:: * Pragma Profile_Warnings::
* Pragma Propagate_Exceptions::
* Pragma Psect_Object:: * Pragma Psect_Object::
* Pragma Pure_05:: * Pragma Pure_05::
* Pragma Pure_12:: * Pragma Pure_12::
...@@ -1010,6 +1011,7 @@ consideration, the use of these pragmas should be minimized. ...@@ -1010,6 +1011,7 @@ consideration, the use of these pragmas should be minimized.
* Pragma Priority_Specific_Dispatching:: * Pragma Priority_Specific_Dispatching::
* Pragma Profile:: * Pragma Profile::
* Pragma Profile_Warnings:: * Pragma Profile_Warnings::
* Pragma Propagate_Exceptions::
* Pragma Psect_Object:: * Pragma Psect_Object::
* Pragma Pure_05:: * Pragma Pure_05::
* Pragma Pure_12:: * Pragma Pure_12::
...@@ -5288,7 +5290,24 @@ generating @code{Restrictions} pragmas, it generates ...@@ -5288,7 +5290,24 @@ generating @code{Restrictions} pragmas, it generates
violations of the profile generate warning messages instead violations of the profile generate warning messages instead
of error messages. of error messages.
@node Pragma Propagate_Exceptions
@unnumberedsec Pragma Propagate_Exceptions
@cindex Interfacing to C++
@findex Propagate_Exceptions
@noindent
Syntax:
@smallexample @c ada
pragma Propagate_Exceptions;
@end smallexample
@noindent @noindent
This pragma is now obsolete and, other than generating a warning if warnings
on obsolescent features are enabled, is ignored.
It is retained for compatibility
purposes. It used to be used in connection with optimization of
a now-obsolete mechanism for implementation of exceptions.
@node Pragma Psect_Object @node Pragma Psect_Object
@unnumberedsec Pragma Psect_Object @unnumberedsec Pragma Psect_Object
@findex Psect_Object @findex Psect_Object
......
...@@ -1147,12 +1147,6 @@ package Opt is ...@@ -1147,12 +1147,6 @@ package Opt is
-- Set to true to enable printing of package standard in source form. -- Set to true to enable printing of package standard in source form.
-- This flag is set by the -gnatS switch -- This flag is set by the -gnatS switch
Propagate_Exceptions : Boolean := False;
-- GNAT
-- Indicates if subprogram descriptor exception tables should be
-- built for imported subprograms. Set True if a Propagate_Exceptions
-- pragma applies to the extended main unit.
type Usage is (Unknown, Not_In_Use, In_Use); type Usage is (Unknown, Not_In_Use, In_Use);
Project_File_In_Use : Usage := Unknown; Project_File_In_Use : Usage := Unknown;
-- GNAT -- GNAT
......
...@@ -10300,7 +10300,7 @@ package body Sem_Prag is ...@@ -10300,7 +10300,7 @@ package body Sem_Prag is
if Warn_On_Obsolescent_Feature then if Warn_On_Obsolescent_Feature then
Error_Msg_N Error_Msg_N
("'G'N'A'T pragma cpp'_virtual is now obsolete and has no " ("'G'N'A'T pragma Cpp'_Virtual is now obsolete and has no "
& "effect?j?", N); & "effect?j?", N);
end if; end if;
end CPP_Virtual; end CPP_Virtual;
...@@ -10315,7 +10315,7 @@ package body Sem_Prag is ...@@ -10315,7 +10315,7 @@ package body Sem_Prag is
if Warn_On_Obsolescent_Feature then if Warn_On_Obsolescent_Feature then
Error_Msg_N Error_Msg_N
("'G'N'A'T pragma cpp'_vtable is now obsolete and has no " ("'G'N'A'T pragma Cpp'_Vtable is now obsolete and has no "
& "effect?j?", N); & "effect?j?", N);
end if; end if;
end CPP_Vtable; end CPP_Vtable;
...@@ -14604,6 +14604,7 @@ package body Sem_Prag is ...@@ -14604,6 +14604,7 @@ package body Sem_Prag is
when Pragma_Overriding_Renamings => when Pragma_Overriding_Renamings =>
GNAT_Pragma; GNAT_Pragma;
Check_Arg_Count (0); Check_Arg_Count (0);
Check_Valid_Configuration_Pragma;
Overriding_Renamings := True; Overriding_Renamings := True;
---------- ----------
...@@ -15039,7 +15040,7 @@ package body Sem_Prag is ...@@ -15039,7 +15040,7 @@ package body Sem_Prag is
-- pragma Predicate -- pragma Predicate
-- ([Entity =>] type_LOCAL_NAME, -- ([Entity =>] type_LOCAL_NAME,
-- [Check =>] EXPRESSION); -- [Check =>] boolean_EXPRESSION);
when Pragma_Predicate => Predicate : declare when Pragma_Predicate => Predicate : declare
Type_Id : Node_Id; Type_Id : Node_Id;
...@@ -15469,10 +15470,10 @@ package body Sem_Prag is ...@@ -15469,10 +15470,10 @@ package body Sem_Prag is
GNAT_Pragma; GNAT_Pragma;
Check_Arg_Count (0); Check_Arg_Count (0);
-- This code does not agree with above (no effect) comment ??? if Warn_On_Obsolescent_Feature then
Error_Msg_N
if In_Extended_Main_Source_Unit (N) then ("'G'N'A'T pragma Propagate'_Exceptions is now obsolete " &
Propagate_Exceptions := True; "and has no effect?j?", N);
end if; end if;
------------------ ------------------
......
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