[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com> * exp_ch7.adb: Minor reformatting. 2014-07-18 Claire Dross <dross@adacore.com> * sem_aux.ads (Get_Binary_Nkind): New function that returns the Node_Kind value of an entity defining a binary operator. (Get_Unary_Nkind): New function that returns the Node_Kind value of an entity defining a unary operator. 2014-07-18 Pascal Obry <obry@adacore.com> * sysdep.c: comment update. * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of platforms where it is known to be supported. 2014-07-18 Thomas Quinot <quinot@adacore.com> * sem_dist.adb (Process_Remote_AST_Declaration): Need to set Fat_Type's Ekind in order to be able to use its Corresponding_Remote_Type attribute. From-SVN: r212815
This commit is contained in:
parent
4ac2bbbd05
commit
4b03d94623
@ -1,3 +1,26 @@
|
||||
2014-07-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* exp_ch7.adb: Minor reformatting.
|
||||
|
||||
2014-07-18 Claire Dross <dross@adacore.com>
|
||||
|
||||
* sem_aux.ads (Get_Binary_Nkind): New function that returns
|
||||
the Node_Kind value of an entity defining a binary operator.
|
||||
(Get_Unary_Nkind): New function that returns the Node_Kind value
|
||||
of an entity defining a unary operator.
|
||||
|
||||
2014-07-18 Pascal Obry <obry@adacore.com>
|
||||
|
||||
* sysdep.c: comment update.
|
||||
* adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
|
||||
platforms where it is known to be supported.
|
||||
|
||||
2014-07-18 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* sem_dist.adb (Process_Remote_AST_Declaration): Need
|
||||
to set Fat_Type's Ekind in order to be able to use its
|
||||
Corresponding_Remote_Type attribute.
|
||||
|
||||
2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* einfo.adb Last_Aggregate_Assignment is now Node 30.
|
||||
|
@ -229,9 +229,6 @@ extern unsigned int LIB$CALLG_64 (unsigned long long argument_list [],
|
||||
|
||||
#else
|
||||
#include <utime.h>
|
||||
#if ! defined (__vxworks)
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_WIN32)
|
||||
@ -854,10 +851,19 @@ __gnat_rmdir (char *path)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (_WIN32) || defined (linux) || defined (sun) \
|
||||
|| defined (__FreeBSD__)
|
||||
#define HAS_TARGET_WCHAR_T
|
||||
#endif
|
||||
|
||||
#ifdef HAS_TARGET_WCHAR_T
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
int
|
||||
__gnat_fputwc(int c, FILE *stream)
|
||||
{
|
||||
#if ! defined (__vxworks)
|
||||
#ifdef HAS_TARGET_WCHAR_T
|
||||
return fputwc ((wchar_t)c, stream);
|
||||
#else
|
||||
return fputc (c, stream);
|
||||
|
@ -2610,7 +2610,7 @@ package body Exp_Ch7 is
|
||||
Label_Construct => Label));
|
||||
|
||||
-- Create the associated jump with this object, generate:
|
||||
--
|
||||
|
||||
-- when <counter> =>
|
||||
-- goto L<counter>;
|
||||
|
||||
@ -2623,7 +2623,7 @@ package body Exp_Ch7 is
|
||||
Name => New_Occurrence_Of (Entity (Label_Id), Loc)))));
|
||||
|
||||
-- Insert the jump destination, generate:
|
||||
--
|
||||
|
||||
-- <<L<counter>>>
|
||||
|
||||
Append_To (Finalizer_Stmts, Label);
|
||||
@ -2742,7 +2742,7 @@ package body Exp_Ch7 is
|
||||
-- Free (Ptr_Typ (Temp));
|
||||
-- end;
|
||||
-- end if;
|
||||
--
|
||||
|
||||
-- The generated code effectively detaches the temporary from the
|
||||
-- caller finalization master and deallocates the object. This is
|
||||
-- disabled on .NET/JVM because pools are not supported.
|
||||
|
@ -32,7 +32,6 @@
|
||||
|
||||
with Atree; use Atree;
|
||||
with Einfo; use Einfo;
|
||||
with Sinfo; use Sinfo;
|
||||
with Snames; use Snames;
|
||||
with Stand; use Stand;
|
||||
with Uintp; use Uintp;
|
||||
@ -435,6 +434,52 @@ package body Sem_Aux is
|
||||
return Empty;
|
||||
end First_Tag_Component;
|
||||
|
||||
---------------------
|
||||
-- Get_Binary_Nkind --
|
||||
---------------------
|
||||
|
||||
function Get_Binary_Nkind (Op : Entity_Id) return Node_Kind is
|
||||
Name : constant String := Get_Name_String (Chars (Op));
|
||||
begin
|
||||
if Name = "Oadd" then
|
||||
return N_Op_Add;
|
||||
elsif Name = "Oconcat" then
|
||||
return N_Op_Concat;
|
||||
elsif Name = "Oexpon" then
|
||||
return N_Op_Expon;
|
||||
elsif Name = "Osubtract" then
|
||||
return N_Op_Subtract;
|
||||
elsif Name = "Omod" then
|
||||
return N_Op_Mod;
|
||||
elsif Name = "Omultiply" then
|
||||
return N_Op_Multiply;
|
||||
elsif Name = "Odivide" then
|
||||
return N_Op_Divide;
|
||||
elsif Name = "Orem" then
|
||||
return N_Op_Rem;
|
||||
elsif Name = "Oand" then
|
||||
return N_Op_And;
|
||||
elsif Name = "Oeq" then
|
||||
return N_Op_Eq;
|
||||
elsif Name = "Oge" then
|
||||
return N_Op_Ge;
|
||||
elsif Name = "Ogt" then
|
||||
return N_Op_Gt;
|
||||
elsif Name = "Ole" then
|
||||
return N_Op_Le;
|
||||
elsif Name = "Olt" then
|
||||
return N_Op_Lt;
|
||||
elsif Name = "One" then
|
||||
return N_Op_Ne;
|
||||
elsif Name = "Oxor" then
|
||||
return N_Op_Or;
|
||||
elsif Name = "Oor" then
|
||||
return N_Op_Xor;
|
||||
else
|
||||
raise Program_Error;
|
||||
end if;
|
||||
end Get_Binary_Nkind;
|
||||
|
||||
------------------
|
||||
-- Get_Rep_Item --
|
||||
------------------
|
||||
@ -602,6 +647,26 @@ package body Sem_Aux is
|
||||
return Empty;
|
||||
end Get_Rep_Pragma;
|
||||
|
||||
---------------------
|
||||
-- Get_Unary_Nkind --
|
||||
---------------------
|
||||
|
||||
function Get_Unary_Nkind (Op : Entity_Id) return Node_Kind is
|
||||
Name : constant String := Get_Name_String (Chars (Op));
|
||||
begin
|
||||
if Name = "Oabs" then
|
||||
return N_Op_Abs;
|
||||
elsif Name = "Osubtract" then
|
||||
return N_Op_Minus;
|
||||
elsif Name = "Onot" then
|
||||
return N_Op_Not;
|
||||
elsif Name = "Oadd" then
|
||||
return N_Op_Plus;
|
||||
else
|
||||
raise Program_Error;
|
||||
end if;
|
||||
end Get_Unary_Nkind;
|
||||
|
||||
---------------------------------
|
||||
-- Has_External_Tag_Rep_Clause --
|
||||
---------------------------------
|
||||
|
@ -42,6 +42,7 @@ with Alloc; use Alloc;
|
||||
with Namet; use Namet;
|
||||
with Table;
|
||||
with Types; use Types;
|
||||
with Sinfo; use Sinfo;
|
||||
|
||||
package Sem_Aux is
|
||||
|
||||
@ -384,4 +385,18 @@ package Sem_Aux is
|
||||
-- Given an entity for a package or generic package, return corresponding
|
||||
-- package specification. Simplifies handling of child units, and better
|
||||
-- than the old idiom: Specification (Unit_Declaration_Node (Pack_Id)).
|
||||
|
||||
function Get_Binary_Nkind (Op : Entity_Id) return Node_Kind;
|
||||
-- Op must be an entity with an Ekind of E_Operator.
|
||||
-- This function returns the Nkind value that would
|
||||
-- be used to construct a binary operator node referencing
|
||||
-- this entity. It is an error to call this function
|
||||
-- if Ekind (Op) /= E_Operator.
|
||||
|
||||
function Get_Unary_Nkind (Op : Entity_Id) return Node_Kind;
|
||||
-- Op must be an entity with an Ekind of E_Operator.
|
||||
-- This function returns the Nkind value that would
|
||||
-- be used to construct a unary operator node referencing
|
||||
-- this entity. It is an error to call this function
|
||||
-- if Ekind (Op) /= E_Operator.
|
||||
end Sem_Aux;
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 1992-2014, 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- --
|
||||
@ -647,7 +647,14 @@ package body Sem_Dist is
|
||||
New_Occurrence_Of (RACW_Type, Loc)))))));
|
||||
|
||||
Set_Equivalent_Type (User_Type, Fat_Type);
|
||||
|
||||
-- Set Fat_Type's Etype early so that we can use its
|
||||
-- Corresponding_Remote_Type attribute, whose presence indicates that
|
||||
-- this is the record type used to implement a RAS.
|
||||
|
||||
Set_Ekind (Fat_Type, E_Record_Type);
|
||||
Set_Corresponding_Remote_Type (Fat_Type, User_Type);
|
||||
|
||||
Insert_After_And_Analyze (Subpkg_Body, Fat_Type_Decl);
|
||||
|
||||
-- The reason we suppress the initialization procedure is that we know
|
||||
|
@ -105,11 +105,11 @@ extern struct tm *localtime_r(const time_t *, struct tm *);
|
||||
end-of-file.
|
||||
|
||||
The other target dependent declarations here are for the three functions
|
||||
__gnat_set_binary_mode, __gnat_set_text_mode and __gnat_set_wide_text_mode:
|
||||
__gnat_set_binary_mode, __gnat_set_text_mode and __gnat_set_mode:
|
||||
|
||||
void __gnat_set_binary_mode (int handle);
|
||||
void __gnat_set_text_mode (int handle);
|
||||
void __gnat_set_wide_text_mode (int handle);
|
||||
void __gnat_set_mode (int handle, int mode);
|
||||
|
||||
These functions have no effect in Unix (or similar systems where there is
|
||||
no distinction between binary and text files), but in DOS (and similar
|
||||
|
Loading…
Reference in New Issue
Block a user