Update concepts branch to revision 131834
[official-gcc.git] / gcc / ada / s-stalib.adb
blobe9df807d3898a2a6aab02f84017c4878373f07c1
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- S Y S T E M . S T A N D A R D _ L I B R A R Y --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1995-2008, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 pragma Warnings (Off);
35 pragma Compiler_Unit;
36 pragma Warnings (On);
38 -- The purpose of this body is simply to ensure that the two with'ed units
39 -- are properly included in the link. They are not with'ed from the spec
40 -- of System.Standard_Library, since this would cause order of elaboration
41 -- problems (Elaborate_Body would have the same problem).
43 pragma Polling (Off);
44 -- We must turn polling off for this unit, because otherwise we get
45 -- elaboration circularities with Ada.Exceptions if polling is on.
47 pragma Warnings (Off);
48 -- Kill warnings from unused withs
50 with System.Soft_Links;
51 -- Referenced directly from generated code using external symbols so it
52 -- must always be present in a build, even if no unit has a direct with
53 -- of this unit. Also referenced from exception handling routines.
54 -- This is needed for programs that don't use exceptions explicitly but
55 -- direct calls to Ada.Exceptions are generated by gigi (for example,
56 -- by calling __gnat_raise_constraint_error directly).
58 with System.Memory;
59 -- Referenced directly from generated code using external symbols, so it
60 -- must always be present in a build, even if no unit has a direct with
61 -- of this unit.
63 pragma Warnings (On);
65 package body System.Standard_Library is
67 Runtime_Finalized : Boolean := False;
68 -- Set to True when adafinal is called. Used to ensure that subsequent
69 -- calls to adafinal after the first have no effect.
71 --------------------------
72 -- Abort_Undefer_Direct --
73 --------------------------
75 procedure Abort_Undefer_Direct is
76 begin
77 System.Soft_Links.Abort_Undefer.all;
78 end Abort_Undefer_Direct;
80 --------------
81 -- Adafinal --
82 --------------
84 procedure Adafinal is
85 begin
86 if not Runtime_Finalized then
87 Runtime_Finalized := True;
88 System.Soft_Links.Adafinal.all;
89 end if;
90 end Adafinal;
92 -----------------
93 -- Break_Start --
94 -----------------
96 procedure Break_Start;
97 pragma Export (C, Break_Start, "__gnat_break_start");
98 -- This is a dummy procedure that is called at the start of execution.
99 -- Its sole purpose is to provide a well defined point for the placement
100 -- of a main program breakpoint.
102 procedure Break_Start is
103 begin
104 null;
105 end Break_Start;
107 end System.Standard_Library;