diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-27 16:01:00 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-07-27 16:01:00 +0200 |
commit | fc53fe76ccbb60528aeb790474c3ac0c20e14680 (patch) | |
tree | 53b02a8e5ca17e38ee9748b1580d30ede2c142c5 /gcc/ada/a-except.adb | |
parent | cff7cd9b1336236660bf486021063e96271cf137 (diff) | |
download | gcc-fc53fe76ccbb60528aeb790474c3ac0c20e14680.zip gcc-fc53fe76ccbb60528aeb790474c3ac0c20e14680.tar.gz gcc-fc53fe76ccbb60528aeb790474c3ac0c20e14680.tar.bz2 |
[multiple changes]
2009-07-27 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: gnatcheck Unconstrained_Array_Returns rule: Add to the
rule definition the paragraph that explains that generic functions and
functions from generic packages are not checked.
2009-07-27 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (New_Overloaded_Entity): Add test for an expanded null
procedure when determining whether to set the Overridden_Operation
field of a subprogram overriding an inherited subprogram.
2009-07-27 Robert Dewar <dewar@adacore.com>
* a-except.adb, a-except-2005.ads: Minor reformatting
From-SVN: r150120
Diffstat (limited to 'gcc/ada/a-except.adb')
-rw-r--r-- | gcc/ada/a-except.adb | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb index cf04fd4..c9fe38b 100644 --- a/gcc/ada/a-except.adb +++ b/gcc/ada/a-except.adb @@ -57,9 +57,9 @@ with System.Soft_Links; use System.Soft_Links; package body Ada.Exceptions is pragma Suppress (All_Checks); - -- We definitely do not want exceptions occurring within this unit, or - -- we are in big trouble. If an exceptional situation does occur, better - -- that it not be raised, since raising it can cause confusing chaos. + -- We definitely do not want exceptions occurring within this unit, or we + -- are in big trouble. If an exceptional situation does occur, better that + -- it not be raised, since raising it can cause confusing chaos. ----------------------- -- Local Subprograms -- @@ -77,14 +77,14 @@ package body Ada.Exceptions is procedure To_Stderr (S : String); pragma Export (Ada, To_Stderr, "__gnat_to_stderr"); - -- Little routine to output string to stderr that is also used - -- in the tasking run time. + -- Little routine to output string to stderr that is also used in the + -- tasking run time. procedure To_Stderr (C : Character); pragma Inline (To_Stderr); pragma Export (Ada, To_Stderr, "__gnat_to_stderr_char"); - -- Little routine to output a character to stderr, used by some of - -- the separate units below. + -- Little routine to output a character to stderr, used by some of the + -- separate units below. package Exception_Data is @@ -109,9 +109,9 @@ package body Ada.Exceptions is (Id : Exception_Id; Message : String); -- This routine is called to setup the exception referenced by the - -- Current_Excep field in the TSD to contain the indicated Id value - -- and message. Message is a string which is generated as the - -- exception message. + -- Current_Excep field in the TSD to contain the indicated Id value and + -- message. Message is a string which is generated as the exception + -- message. -------------------------------------- -- Exception information subprogram -- @@ -126,18 +126,20 @@ package body Ada.Exceptions is -- Call stack traceback locations: (only if at least one location) -- <0xyyyyyyyy 0xyyyyyyyy ...> (is recorded) -- - -- The lines are separated by a ASCII.LF character. - -- The nnnn is the partition Id given as decimal digits. + -- The lines are separated by a ASCII.LF character + -- + -- The nnnn is the partition Id given as decimal digits + -- -- The 0x... line represents traceback program counter locations, in -- execution order with the first one being the exception location. It -- is present only -- - -- The Exception_Name and Message lines are omitted in the abort - -- signal case, since this is not really an exception. + -- The Exception_Name and Message lines are omitted in the abort signal + -- case, since this is not really an exception. - -- !! If the format of the generated string is changed, please note - -- !! that an equivalent modification to the routine String_To_EO must - -- !! be made to preserve proper functioning of the stream attributes. + -- Note: If the format of the generated string is changed, please note + -- that an equivalent modification to the routine String_To_EO must be + -- made to preserve proper functioning of the stream attributes. --------------------------------------- -- Exception backtracing subprograms -- @@ -198,11 +200,11 @@ package body Ada.Exceptions is procedure Unhandled_Exception_Terminate; pragma No_Return (Unhandled_Exception_Terminate); - -- This procedure is called to terminate execution following an - -- unhandled exception. The exception information, including - -- traceback if available is output, and execution is then - -- terminated. Note that at the point where this routine is - -- called, the stack has typically been destroyed. + -- This procedure is called to terminate program execution following an + -- unhandled exception. The exception information, including traceback + -- if available is output, and execution is then terminated. Note that + -- at the point where this routine is called, the stack has typically + -- been destroyed. end Exception_Traces; @@ -253,10 +255,10 @@ package body Ada.Exceptions is procedure Raise_With_Msg (E : Exception_Id); pragma No_Return (Raise_With_Msg); pragma Export (C, Raise_With_Msg, "__gnat_raise_with_msg"); - -- Raises an exception with given exception id value. A message - -- is associated with the raise, and has already been stored in the - -- exception occurrence referenced by the Current_Excep in the TSD. - -- Abort is deferred before the raise call. + -- Raises an exception with given exception id value. A message is + -- associated with the raise, and has already been stored in the exception + -- occurrence referenced by the Current_Excep in the TSD. Abort is deferred + -- before the raise call. procedure Raise_With_Location_And_Msg (E : Exception_Id; @@ -266,8 +268,8 @@ package body Ada.Exceptions is pragma No_Return (Raise_With_Location_And_Msg); -- Raise an exception with given exception id value. A filename and line -- number is associated with the raise and is stored in the exception - -- occurrence and in addition a string message M is appended to - -- this (if M is not null). + -- occurrence and in addition a string message M is appended to this + -- if M is not null. procedure Raise_Constraint_Error (File : System.Address; @@ -344,9 +346,9 @@ package body Ada.Exceptions is procedure Reraise; pragma No_Return (Reraise); pragma Export (C, Reraise, "__gnat_reraise"); - -- Reraises the exception referenced by the Current_Excep field of - -- the TSD (all fields of this exception occurrence are set). Abort - -- is deferred before the reraise operation. + -- Reraises the exception referenced by the Current_Excep field of the TSD + -- (all fields of this exception occurrence are set). Abort is deferred + -- before the reraise operation. -- Save_Occurrence variations: As the management of the private data -- attached to occurrences is delicate, whether or not pointers to such @@ -373,11 +375,10 @@ package body Ada.Exceptions is -- Run-Time Check Routines -- ----------------------------- - -- These routines raise a specific exception with a reason message - -- attached. The parameters are the file name and line number in each - -- case. The names are keyed to the codes defined in types.ads and - -- a-types.h (for example, the name Rcheck_05 refers to the Reason - -- RT_Exception_Code'Val (5)). + -- Routines to a specific exception with a reason message attached. The + -- parameters are the file name and line number in each case. The names are + -- keyed to the codes defined in types.ads and a-types.h (for example, the + -- name Rcheck_05 refers to the Reason RT_Exception_Code'Val (5)). procedure Rcheck_00 (File : System.Address; Line : Integer); procedure Rcheck_01 (File : System.Address; Line : Integer); @@ -546,8 +547,8 @@ package body Ada.Exceptions is -- perform periodic but not systematic operations. procedure Poll is separate; - -- The actual polling routine is separate, so that it can easily - -- be replaced with a target dependent version. + -- The actual polling routine is separate, so that it can easily be + -- replaced with a target dependent version. ------------------------------ -- Current_Target_Exception -- @@ -569,8 +570,8 @@ package body Ada.Exceptions is -- EO_To_String -- ------------------ - -- We use the null string to represent the null occurrence, otherwise - -- we output the Exception_Information string for the occurrence. + -- We use the null string to represent the null occurrence, otherwise we + -- output the Exception_Information string for the occurrence. function EO_To_String (X : Exception_Occurrence) return String renames Stream_Attributes.EO_To_String; @@ -583,9 +584,9 @@ package body Ada.Exceptions is (X : Exception_Occurrence) return Exception_Id is begin - -- Note that the following test used to be here for the original - -- Ada 95 semantics, but these were modified by AI-241 to require - -- returning Null_Id instead of raising Constraint_Error. + -- Note that the following test used to be here for the original Ada 95 + -- semantics, but these were modified by AI-241 to require returning + -- Null_Id instead of raising Constraint_Error. -- if X.Id = Null_Id then -- raise Constraint_Error; @@ -667,8 +668,8 @@ package body Ada.Exceptions is -------------------- package body Exception_Data is separate; - -- This package can be easily dummied out if we do not want the - -- basic support for exception messages (such as in Ada 83). + -- This package can be easily dummied out if we do not want the basic + -- support for exception messages (such as in Ada 83). package body Exception_Propagation is @@ -691,10 +692,10 @@ package body Ada.Exceptions is ---------------------- package body Exception_Traces is separate; - -- Depending on the underlying support for IO the implementation - -- will differ. Moreover we would like to dummy out this package - -- in case we do not want any exception tracing support. This is - -- why this package is separated. + -- Depending on the underlying support for IO the implementation will + -- differ. Moreover we would like to dummy out this package in case we do + -- not want any exception tracing support. This is why this package is + -- separated. ----------------------- -- Stream Attributes -- @@ -720,17 +721,17 @@ package body Ada.Exceptions is pragma Import (C, builtin_longjmp, "_gnat_builtin_longjmp"); begin - -- WARNING: There should be no exception handler for this body - -- because this would cause gigi to prepend a setup for a new - -- jmpbuf to the sequence of statements in case of built-in sjljl. - -- We would then always get this new buf in Jumpbuf_Ptr instead of the - -- one for the exception we are handling, which would completely break - -- the whole design of this procedure. + -- WARNING: There should be no exception handler for this body because + -- this would cause gigi to prepend a setup for a new jmpbuf to the + -- sequence of statements in case of built-in sjljl. We would then + -- always get this new buf in Jumpbuf_Ptr instead of the one for the + -- exception we are handling, which would completely break the whole + -- design of this procedure. - -- If the jump buffer pointer is non-null, transfer control using - -- it. Otherwise announce an unhandled exception (note that this - -- means that we have no finalizations to do other than at the outer - -- level). Perform the necessary notification tasks in both cases. + -- If the jump buffer pointer is non-null, transfer control using it. + -- Otherwise announce an unhandled exception (note that this means that + -- we have no finalizations to do other than at the outer level). + -- Perform the necessary notification tasks in both cases. if Jumpbuf_Ptr /= Null_Address then if not Excep.Exception_Raised then @@ -1251,9 +1252,9 @@ package body Ada.Exceptions is begin -- Setup Target as an exception to be propagated in the calling task -- (rendezvous-wise), taking care not to clobber the associated private - -- data. Target is expected to be a pointer to the calling task's - -- fixed TSD occurrence, which is very different from Get_Current_Excep - -- here because this subprogram is called from the called task. + -- data. Target is expected to be a pointer to the calling task's fixed + -- TSD occurrence, which is very different from Get_Current_Excep here + -- because this subprogram is called from the called task. Save_Occurrence_No_Private (Target.all, Source); end Transfer_Occurrence; @@ -1293,7 +1294,6 @@ package body Ada.Exceptions is --------------- procedure To_Stderr (C : Character) is - type int is new Integer; procedure put_char_stderr (C : int); |