+2013-02-06 Tristan Gingold <gingold@adacore.com>
+
+ * raise-gcc.c: Remove useless includes (sys/stat.h, adaint.h)
+ Enclosing debugging functions within #ifndef inhibit_libc to
+ support builds without full C headers.
+
+2013-02-06 Thomas Quinot <quinot@adacore.com>
+
+ * gnat_rm.texi: Add a minimal example of Scalar_Storage_Order.
+
+2013-02-06 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * sem_ch10.adb (Install_Limited_Withed_Unit): Add a missing
+ check to detect a parent-child relationship between two units in
+ order to correctly bypass the installation of a limited view. In
+ other words, the comment on the intended usage of the check was
+ correct, but the code itself did not reflect the behavior.
+
2013-02-06 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate the
@noindent
For every array or record type @var{S}, the representation attribute
@code{Scalar_Storage_Order} denotes the order in which storage elements
-that make up scalar components are ordered within S. Other properties are
+that make up scalar components are ordered within S:
+
+@smallexample @c ada
+ -- Component type definitions
+
+ subtype Yr_Type is Natural range 0 .. 127;
+ subtype Mo_Type is Natural range 1 .. 12;
+ subtype Da_Type is Natural range 1 .. 31;
+
+ -- Record declaration
+
+ type Date is record
+ Years_Since_1980 : Yr_Type;
+ Month : Mo_Type;
+ Day_Of_Month : Da_Type;
+ end record;
+
+ -- Record representation clause
+
+ for Date use record
+ Years_Since_1980 at 0 range 0 .. 6;
+ Month at 0 range 7 .. 10;
+ Day_Of_Month at 0 range 11 .. 15;
+ end record;
+
+ -- Attribute definition clauses
+
+ for Date'Bit_Order use System.High_Order_First;
+ for Date'Scalar_Storage_Order use System.High_Order_First;
+ -- If Scalar_Storage_Order is specified, it must be consistent with
+ -- Bit_Order, so it's best to always define the latter explicitly if
+ -- the former is used.
+@end smallexample
+
+Other properties are
as for standard representation attribute @code{Bit_Order}, as defined by
Ada RM 13.5.3(4). The default is @code{System.Default_Bit_Order}.
For a record type @var{S}, if @code{@var{S}'Scalar_Storage_Order} is
specified explicitly, it shall be equal to @code{@var{S}'Bit_Order}. Note:
-This means that if a @code{Scalar_Storage_Order} attribute definition
+this means that if a @code{Scalar_Storage_Order} attribute definition
clause is not confirming, then the type's @code{Bit_Order} shall be
specified explicitly and set to the same value.
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2012, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2013, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#include "tconfig.h"
#include "tsystem.h"
-#include <sys/stat.h>
+
#include <stdarg.h>
typedef char bool;
# define true 1
# define false 0
-#include "adaint.h"
#include "raise.h"
#ifdef __APPLE__
(_Unwind_Exception *);
extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
-#include "dwarf2.h"
#include "unwind-pe.h"
/* The known and handled exception classes. */
-- The DB stuff below is there for debugging purposes only. --
-------------------------------------------------------------- */
+#ifndef inhibit_libc
+
#define DB_PHASES 0x1
#define DB_CSITE 0x2
#define DB_ACTIONS 0x4
db (DB_PHASES, " :\n");
}
-
+#else /* !inhibit_libc */
+#define db_phases(X)
+#define db_indent(X)
+#define db(X, ...)
+#endif /* !inhibit_libc */
/* ---------------------------------------------------------------
-- Now come a set of useful structures and helper routines. --
static void
db_region_for (region_descriptor *region, _Unwind_Ptr ip)
{
+#ifndef inhibit_libc
if (! (db_accepted_codes () & DB_REGIONS))
return;
db (DB_REGIONS, "no lsda");
db (DB_REGIONS, "\n");
+#endif
}
/* Retrieve the ttype entry associated with FILTER in the REGION's
static void
db_action_for (action_descriptor *action, _Unwind_Ptr ip)
{
+#ifndef inhibit_libc
db (DB_ACTIONS, "For ip @ %p => ", (void *)ip);
switch (action->kind)
db (DB_ACTIONS, "Err? Unexpected action kind !\n");
break;
}
-
- return;
+#endif
}
/* Search the call_site_table of REGION for an entry appropriate for the
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
if P = Cunit_Entity (Current_Sem_Unit)
or else
(Nkind (Unit (Cunit (Current_Sem_Unit))) = N_Package_Body
- and then P = Main_Unit_Entity)
+ and then P = Main_Unit_Entity
+ and then
+ Is_Ancestor_Unit (Cunit (Main_Unit), Cunit (Current_Sem_Unit)))
then
return;
end if;