[multiple changes]
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. From-SVN: r195794
This commit is contained in:
parent
c91dbd184b
commit
d7ffe14c00
4 changed files with 71 additions and 11 deletions
|
@ -1,3 +1,21 @@
|
|||
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
|
||||
|
|
|
@ -7051,13 +7051,47 @@ this attribute.
|
|||
@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.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* *
|
||||
* 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- *
|
||||
|
@ -38,13 +38,12 @@
|
|||
|
||||
#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__
|
||||
|
@ -81,7 +80,6 @@ extern struct Exception_Occurrence *__gnat_setup_current_excep
|
|||
(_Unwind_Exception *);
|
||||
extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
|
||||
|
||||
#include "dwarf2.h"
|
||||
#include "unwind-pe.h"
|
||||
|
||||
/* The known and handled exception classes. */
|
||||
|
@ -93,6 +91,8 @@ extern void __gnat_unhandled_except_handler (_Unwind_Exception *);
|
|||
-- 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
|
||||
|
@ -193,7 +193,11 @@ db_phases (int phases)
|
|||
|
||||
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. --
|
||||
|
@ -516,6 +520,7 @@ get_ip_from_context (_Unwind_Context *uw_context)
|
|||
static void
|
||||
db_region_for (region_descriptor *region, _Unwind_Ptr ip)
|
||||
{
|
||||
#ifndef inhibit_libc
|
||||
if (! (db_accepted_codes () & DB_REGIONS))
|
||||
return;
|
||||
|
||||
|
@ -527,6 +532,7 @@ db_region_for (region_descriptor *region, _Unwind_Ptr ip)
|
|||
db (DB_REGIONS, "no lsda");
|
||||
|
||||
db (DB_REGIONS, "\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Retrieve the ttype entry associated with FILTER in the REGION's
|
||||
|
@ -647,6 +653,7 @@ typedef struct
|
|||
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)
|
||||
|
@ -672,8 +679,7 @@ db_action_for (action_descriptor *action, _Unwind_Ptr ip)
|
|||
db (DB_ACTIONS, "Err? Unexpected action kind !\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Search the call_site_table of REGION for an entry appropriate for the
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
-- --
|
||||
-- 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- --
|
||||
|
@ -4743,7 +4743,9 @@ package body Sem_Ch10 is
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue