[multiple changes]
2014-07-18 Vincent Celier <celier@adacore.com> * debug.adb: Update comment. 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com> * exp_util.adb (Needs_Finalization): There is no reason why a C type should not benefit from finalization actions. 2014-07-18 Thomas Quinot <quinot@adacore.com> * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris (FILENAME_MAX): Remove unneeded definition. From-SVN: r212785
This commit is contained in:
parent
5b89faafa8
commit
0439c912c3
@ -1,3 +1,17 @@
|
||||
2014-07-18 Vincent Celier <celier@adacore.com>
|
||||
|
||||
* debug.adb: Update comment.
|
||||
|
||||
2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* exp_util.adb (Needs_Finalization): There is no reason why a
|
||||
C type should not benefit from finalization actions.
|
||||
|
||||
2014-07-18 Thomas Quinot <quinot@adacore.com>
|
||||
|
||||
* s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
|
||||
(FILENAME_MAX): Remove unneeded definition.
|
||||
|
||||
2014-07-18 Robert Dewar <dewar@adacore.com>
|
||||
|
||||
* exp_attr.adb, debug.adb: Update comments.
|
||||
|
@ -135,7 +135,6 @@ package body Debug is
|
||||
-- d.O Dump internal SCO tables
|
||||
-- d.P Previous (non-optimized) handling of length comparisons
|
||||
-- d.Q Previous (incomplete) style check for binary operators
|
||||
-- ??? need to add doc for above switch
|
||||
-- d.R Restrictions in ali files in positional form
|
||||
-- d.S Force Optimize_Alignment (Space)
|
||||
-- d.T Force Optimize_Alignment (Time)
|
||||
@ -821,82 +820,143 @@ package body Debug is
|
||||
--------------------
|
||||
|
||||
procedure Set_Debug_Flag (C : Character; Val : Boolean := True) is
|
||||
subtype Dig is Character range '1' .. '9';
|
||||
subtype Dig is Character range '1' .. '9';
|
||||
subtype LLet is Character range 'a' .. 'z';
|
||||
subtype ULet is Character range 'A' .. 'Z';
|
||||
|
||||
begin
|
||||
if C in Dig then
|
||||
case Dig (C) is
|
||||
when '1' => Debug_Flag_1 := Val;
|
||||
when '2' => Debug_Flag_2 := Val;
|
||||
when '3' => Debug_Flag_3 := Val;
|
||||
when '4' => Debug_Flag_4 := Val;
|
||||
when '5' => Debug_Flag_5 := Val;
|
||||
when '6' => Debug_Flag_6 := Val;
|
||||
when '7' => Debug_Flag_7 := Val;
|
||||
when '8' => Debug_Flag_8 := Val;
|
||||
when '9' => Debug_Flag_9 := Val;
|
||||
when '1' =>
|
||||
Debug_Flag_1 := Val;
|
||||
when '2' =>
|
||||
Debug_Flag_2 := Val;
|
||||
when '3' =>
|
||||
Debug_Flag_3 := Val;
|
||||
when '4' =>
|
||||
Debug_Flag_4 := Val;
|
||||
when '5' =>
|
||||
Debug_Flag_5 := Val;
|
||||
when '6' =>
|
||||
Debug_Flag_6 := Val;
|
||||
when '7' =>
|
||||
Debug_Flag_7 := Val;
|
||||
when '8' =>
|
||||
Debug_Flag_8 := Val;
|
||||
when '9' =>
|
||||
Debug_Flag_9 := Val;
|
||||
end case;
|
||||
|
||||
elsif C in ULet then
|
||||
case ULet (C) is
|
||||
when 'A' => Debug_Flag_AA := Val;
|
||||
when 'B' => Debug_Flag_BB := Val;
|
||||
when 'C' => Debug_Flag_CC := Val;
|
||||
when 'D' => Debug_Flag_DD := Val;
|
||||
when 'E' => Debug_Flag_EE := Val;
|
||||
when 'F' => Debug_Flag_FF := Val;
|
||||
when 'G' => Debug_Flag_GG := Val;
|
||||
when 'H' => Debug_Flag_HH := Val;
|
||||
when 'I' => Debug_Flag_II := Val;
|
||||
when 'J' => Debug_Flag_JJ := Val;
|
||||
when 'K' => Debug_Flag_KK := Val;
|
||||
when 'L' => Debug_Flag_LL := Val;
|
||||
when 'M' => Debug_Flag_MM := Val;
|
||||
when 'N' => Debug_Flag_NN := Val;
|
||||
when 'O' => Debug_Flag_OO := Val;
|
||||
when 'P' => Debug_Flag_PP := Val;
|
||||
when 'Q' => Debug_Flag_QQ := Val;
|
||||
when 'R' => Debug_Flag_RR := Val;
|
||||
when 'S' => Debug_Flag_SS := Val;
|
||||
when 'T' => Debug_Flag_TT := Val;
|
||||
when 'U' => Debug_Flag_UU := Val;
|
||||
when 'V' => Debug_Flag_VV := Val;
|
||||
when 'W' => Debug_Flag_WW := Val;
|
||||
when 'X' => Debug_Flag_XX := Val;
|
||||
when 'Y' => Debug_Flag_YY := Val;
|
||||
when 'Z' => Debug_Flag_ZZ := Val;
|
||||
when 'A' =>
|
||||
Debug_Flag_AA := Val;
|
||||
when 'B' =>
|
||||
Debug_Flag_BB := Val;
|
||||
when 'C' =>
|
||||
Debug_Flag_CC := Val;
|
||||
when 'D' =>
|
||||
Debug_Flag_DD := Val;
|
||||
when 'E' =>
|
||||
Debug_Flag_EE := Val;
|
||||
when 'F' =>
|
||||
Debug_Flag_FF := Val;
|
||||
when 'G' =>
|
||||
Debug_Flag_GG := Val;
|
||||
when 'H' =>
|
||||
Debug_Flag_HH := Val;
|
||||
when 'I' =>
|
||||
Debug_Flag_II := Val;
|
||||
when 'J' =>
|
||||
Debug_Flag_JJ := Val;
|
||||
when 'K' =>
|
||||
Debug_Flag_KK := Val;
|
||||
when 'L' =>
|
||||
Debug_Flag_LL := Val;
|
||||
when 'M' =>
|
||||
Debug_Flag_MM := Val;
|
||||
when 'N' =>
|
||||
Debug_Flag_NN := Val;
|
||||
when 'O' =>
|
||||
Debug_Flag_OO := Val;
|
||||
when 'P' =>
|
||||
Debug_Flag_PP := Val;
|
||||
when 'Q' =>
|
||||
Debug_Flag_QQ := Val;
|
||||
when 'R' =>
|
||||
Debug_Flag_RR := Val;
|
||||
when 'S' =>
|
||||
Debug_Flag_SS := Val;
|
||||
when 'T' =>
|
||||
Debug_Flag_TT := Val;
|
||||
when 'U' =>
|
||||
Debug_Flag_UU := Val;
|
||||
when 'V' =>
|
||||
Debug_Flag_VV := Val;
|
||||
when 'W' =>
|
||||
Debug_Flag_WW := Val;
|
||||
when 'X' =>
|
||||
Debug_Flag_XX := Val;
|
||||
when 'Y' =>
|
||||
Debug_Flag_YY := Val;
|
||||
when 'Z' =>
|
||||
Debug_Flag_ZZ := Val;
|
||||
end case;
|
||||
|
||||
else
|
||||
case LLet (C) is
|
||||
when 'a' => Debug_Flag_A := Val;
|
||||
when 'b' => Debug_Flag_B := Val;
|
||||
when 'c' => Debug_Flag_C := Val;
|
||||
when 'd' => Debug_Flag_D := Val;
|
||||
when 'e' => Debug_Flag_E := Val;
|
||||
when 'f' => Debug_Flag_F := Val;
|
||||
when 'g' => Debug_Flag_G := Val;
|
||||
when 'h' => Debug_Flag_H := Val;
|
||||
when 'i' => Debug_Flag_I := Val;
|
||||
when 'j' => Debug_Flag_J := Val;
|
||||
when 'k' => Debug_Flag_K := Val;
|
||||
when 'l' => Debug_Flag_L := Val;
|
||||
when 'm' => Debug_Flag_M := Val;
|
||||
when 'n' => Debug_Flag_N := Val;
|
||||
when 'o' => Debug_Flag_O := Val;
|
||||
when 'p' => Debug_Flag_P := Val;
|
||||
when 'q' => Debug_Flag_Q := Val;
|
||||
when 'r' => Debug_Flag_R := Val;
|
||||
when 's' => Debug_Flag_S := Val;
|
||||
when 't' => Debug_Flag_T := Val;
|
||||
when 'u' => Debug_Flag_U := Val;
|
||||
when 'v' => Debug_Flag_V := Val;
|
||||
when 'w' => Debug_Flag_W := Val;
|
||||
when 'x' => Debug_Flag_X := Val;
|
||||
when 'y' => Debug_Flag_Y := Val;
|
||||
when 'z' => Debug_Flag_Z := Val;
|
||||
when 'a' =>
|
||||
Debug_Flag_A := Val;
|
||||
when 'b' =>
|
||||
Debug_Flag_B := Val;
|
||||
when 'c' =>
|
||||
Debug_Flag_C := Val;
|
||||
when 'd' =>
|
||||
Debug_Flag_D := Val;
|
||||
when 'e' =>
|
||||
Debug_Flag_E := Val;
|
||||
when 'f' =>
|
||||
Debug_Flag_F := Val;
|
||||
when 'g' =>
|
||||
Debug_Flag_G := Val;
|
||||
when 'h' =>
|
||||
Debug_Flag_H := Val;
|
||||
when 'i' =>
|
||||
Debug_Flag_I := Val;
|
||||
when 'j' =>
|
||||
Debug_Flag_J := Val;
|
||||
when 'k' =>
|
||||
Debug_Flag_K := Val;
|
||||
when 'l' =>
|
||||
Debug_Flag_L := Val;
|
||||
when 'm' =>
|
||||
Debug_Flag_M := Val;
|
||||
when 'n' =>
|
||||
Debug_Flag_N := Val;
|
||||
when 'o' =>
|
||||
Debug_Flag_O := Val;
|
||||
when 'p' =>
|
||||
Debug_Flag_P := Val;
|
||||
when 'q' =>
|
||||
Debug_Flag_Q := Val;
|
||||
when 'r' =>
|
||||
Debug_Flag_R := Val;
|
||||
when 's' =>
|
||||
Debug_Flag_S := Val;
|
||||
when 't' =>
|
||||
Debug_Flag_T := Val;
|
||||
when 'u' =>
|
||||
Debug_Flag_U := Val;
|
||||
when 'v' =>
|
||||
Debug_Flag_V := Val;
|
||||
when 'w' =>
|
||||
Debug_Flag_W := Val;
|
||||
when 'x' =>
|
||||
Debug_Flag_X := Val;
|
||||
when 'y' =>
|
||||
Debug_Flag_Y := Val;
|
||||
when 'z' =>
|
||||
Debug_Flag_Z := Val;
|
||||
end case;
|
||||
end if;
|
||||
end Set_Debug_Flag;
|
||||
@ -906,82 +966,143 @@ package body Debug is
|
||||
---------------------------
|
||||
|
||||
procedure Set_Dotted_Debug_Flag (C : Character; Val : Boolean := True) is
|
||||
subtype Dig is Character range '1' .. '9';
|
||||
subtype Dig is Character range '1' .. '9';
|
||||
subtype LLet is Character range 'a' .. 'z';
|
||||
subtype ULet is Character range 'A' .. 'Z';
|
||||
|
||||
begin
|
||||
if C in Dig then
|
||||
case Dig (C) is
|
||||
when '1' => Debug_Flag_Dot_1 := Val;
|
||||
when '2' => Debug_Flag_Dot_2 := Val;
|
||||
when '3' => Debug_Flag_Dot_3 := Val;
|
||||
when '4' => Debug_Flag_Dot_4 := Val;
|
||||
when '5' => Debug_Flag_Dot_5 := Val;
|
||||
when '6' => Debug_Flag_Dot_6 := Val;
|
||||
when '7' => Debug_Flag_Dot_7 := Val;
|
||||
when '8' => Debug_Flag_Dot_8 := Val;
|
||||
when '9' => Debug_Flag_Dot_9 := Val;
|
||||
when '1' =>
|
||||
Debug_Flag_Dot_1 := Val;
|
||||
when '2' =>
|
||||
Debug_Flag_Dot_2 := Val;
|
||||
when '3' =>
|
||||
Debug_Flag_Dot_3 := Val;
|
||||
when '4' =>
|
||||
Debug_Flag_Dot_4 := Val;
|
||||
when '5' =>
|
||||
Debug_Flag_Dot_5 := Val;
|
||||
when '6' =>
|
||||
Debug_Flag_Dot_6 := Val;
|
||||
when '7' =>
|
||||
Debug_Flag_Dot_7 := Val;
|
||||
when '8' =>
|
||||
Debug_Flag_Dot_8 := Val;
|
||||
when '9' =>
|
||||
Debug_Flag_Dot_9 := Val;
|
||||
end case;
|
||||
|
||||
elsif C in ULet then
|
||||
case ULet (C) is
|
||||
when 'A' => Debug_Flag_Dot_AA := Val;
|
||||
when 'B' => Debug_Flag_Dot_BB := Val;
|
||||
when 'C' => Debug_Flag_Dot_CC := Val;
|
||||
when 'D' => Debug_Flag_Dot_DD := Val;
|
||||
when 'E' => Debug_Flag_Dot_EE := Val;
|
||||
when 'F' => Debug_Flag_Dot_FF := Val;
|
||||
when 'G' => Debug_Flag_Dot_GG := Val;
|
||||
when 'H' => Debug_Flag_Dot_HH := Val;
|
||||
when 'I' => Debug_Flag_Dot_II := Val;
|
||||
when 'J' => Debug_Flag_Dot_JJ := Val;
|
||||
when 'K' => Debug_Flag_Dot_KK := Val;
|
||||
when 'L' => Debug_Flag_Dot_LL := Val;
|
||||
when 'M' => Debug_Flag_Dot_MM := Val;
|
||||
when 'N' => Debug_Flag_Dot_NN := Val;
|
||||
when 'O' => Debug_Flag_Dot_OO := Val;
|
||||
when 'P' => Debug_Flag_Dot_PP := Val;
|
||||
when 'Q' => Debug_Flag_Dot_QQ := Val;
|
||||
when 'R' => Debug_Flag_Dot_RR := Val;
|
||||
when 'S' => Debug_Flag_Dot_SS := Val;
|
||||
when 'T' => Debug_Flag_Dot_TT := Val;
|
||||
when 'U' => Debug_Flag_Dot_UU := Val;
|
||||
when 'V' => Debug_Flag_Dot_VV := Val;
|
||||
when 'W' => Debug_Flag_Dot_WW := Val;
|
||||
when 'X' => Debug_Flag_Dot_XX := Val;
|
||||
when 'Y' => Debug_Flag_Dot_YY := Val;
|
||||
when 'Z' => Debug_Flag_Dot_ZZ := Val;
|
||||
when 'A' =>
|
||||
Debug_Flag_Dot_AA := Val;
|
||||
when 'B' =>
|
||||
Debug_Flag_Dot_BB := Val;
|
||||
when 'C' =>
|
||||
Debug_Flag_Dot_CC := Val;
|
||||
when 'D' =>
|
||||
Debug_Flag_Dot_DD := Val;
|
||||
when 'E' =>
|
||||
Debug_Flag_Dot_EE := Val;
|
||||
when 'F' =>
|
||||
Debug_Flag_Dot_FF := Val;
|
||||
when 'G' =>
|
||||
Debug_Flag_Dot_GG := Val;
|
||||
when 'H' =>
|
||||
Debug_Flag_Dot_HH := Val;
|
||||
when 'I' =>
|
||||
Debug_Flag_Dot_II := Val;
|
||||
when 'J' =>
|
||||
Debug_Flag_Dot_JJ := Val;
|
||||
when 'K' =>
|
||||
Debug_Flag_Dot_KK := Val;
|
||||
when 'L' =>
|
||||
Debug_Flag_Dot_LL := Val;
|
||||
when 'M' =>
|
||||
Debug_Flag_Dot_MM := Val;
|
||||
when 'N' =>
|
||||
Debug_Flag_Dot_NN := Val;
|
||||
when 'O' =>
|
||||
Debug_Flag_Dot_OO := Val;
|
||||
when 'P' =>
|
||||
Debug_Flag_Dot_PP := Val;
|
||||
when 'Q' =>
|
||||
Debug_Flag_Dot_QQ := Val;
|
||||
when 'R' =>
|
||||
Debug_Flag_Dot_RR := Val;
|
||||
when 'S' =>
|
||||
Debug_Flag_Dot_SS := Val;
|
||||
when 'T' =>
|
||||
Debug_Flag_Dot_TT := Val;
|
||||
when 'U' =>
|
||||
Debug_Flag_Dot_UU := Val;
|
||||
when 'V' =>
|
||||
Debug_Flag_Dot_VV := Val;
|
||||
when 'W' =>
|
||||
Debug_Flag_Dot_WW := Val;
|
||||
when 'X' =>
|
||||
Debug_Flag_Dot_XX := Val;
|
||||
when 'Y' =>
|
||||
Debug_Flag_Dot_YY := Val;
|
||||
when 'Z' =>
|
||||
Debug_Flag_Dot_ZZ := Val;
|
||||
end case;
|
||||
|
||||
else
|
||||
case LLet (C) is
|
||||
when 'a' => Debug_Flag_Dot_A := Val;
|
||||
when 'b' => Debug_Flag_Dot_B := Val;
|
||||
when 'c' => Debug_Flag_Dot_C := Val;
|
||||
when 'd' => Debug_Flag_Dot_D := Val;
|
||||
when 'e' => Debug_Flag_Dot_E := Val;
|
||||
when 'f' => Debug_Flag_Dot_F := Val;
|
||||
when 'g' => Debug_Flag_Dot_G := Val;
|
||||
when 'h' => Debug_Flag_Dot_H := Val;
|
||||
when 'i' => Debug_Flag_Dot_I := Val;
|
||||
when 'j' => Debug_Flag_Dot_J := Val;
|
||||
when 'k' => Debug_Flag_Dot_K := Val;
|
||||
when 'l' => Debug_Flag_Dot_L := Val;
|
||||
when 'm' => Debug_Flag_Dot_M := Val;
|
||||
when 'n' => Debug_Flag_Dot_N := Val;
|
||||
when 'o' => Debug_Flag_Dot_O := Val;
|
||||
when 'p' => Debug_Flag_Dot_P := Val;
|
||||
when 'q' => Debug_Flag_Dot_Q := Val;
|
||||
when 'r' => Debug_Flag_Dot_R := Val;
|
||||
when 's' => Debug_Flag_Dot_S := Val;
|
||||
when 't' => Debug_Flag_Dot_T := Val;
|
||||
when 'u' => Debug_Flag_Dot_U := Val;
|
||||
when 'v' => Debug_Flag_Dot_V := Val;
|
||||
when 'w' => Debug_Flag_Dot_W := Val;
|
||||
when 'x' => Debug_Flag_Dot_X := Val;
|
||||
when 'y' => Debug_Flag_Dot_Y := Val;
|
||||
when 'z' => Debug_Flag_Dot_Z := Val;
|
||||
when 'a' =>
|
||||
Debug_Flag_Dot_A := Val;
|
||||
when 'b' =>
|
||||
Debug_Flag_Dot_B := Val;
|
||||
when 'c' =>
|
||||
Debug_Flag_Dot_C := Val;
|
||||
when 'd' =>
|
||||
Debug_Flag_Dot_D := Val;
|
||||
when 'e' =>
|
||||
Debug_Flag_Dot_E := Val;
|
||||
when 'f' =>
|
||||
Debug_Flag_Dot_F := Val;
|
||||
when 'g' =>
|
||||
Debug_Flag_Dot_G := Val;
|
||||
when 'h' =>
|
||||
Debug_Flag_Dot_H := Val;
|
||||
when 'i' =>
|
||||
Debug_Flag_Dot_I := Val;
|
||||
when 'j' =>
|
||||
Debug_Flag_Dot_J := Val;
|
||||
when 'k' =>
|
||||
Debug_Flag_Dot_K := Val;
|
||||
when 'l' =>
|
||||
Debug_Flag_Dot_L := Val;
|
||||
when 'm' =>
|
||||
Debug_Flag_Dot_M := Val;
|
||||
when 'n' =>
|
||||
Debug_Flag_Dot_N := Val;
|
||||
when 'o' =>
|
||||
Debug_Flag_Dot_O := Val;
|
||||
when 'p' =>
|
||||
Debug_Flag_Dot_P := Val;
|
||||
when 'q' =>
|
||||
Debug_Flag_Dot_Q := Val;
|
||||
when 'r' =>
|
||||
Debug_Flag_Dot_R := Val;
|
||||
when 's' =>
|
||||
Debug_Flag_Dot_S := Val;
|
||||
when 't' =>
|
||||
Debug_Flag_Dot_T := Val;
|
||||
when 'u' =>
|
||||
Debug_Flag_Dot_U := Val;
|
||||
when 'v' =>
|
||||
Debug_Flag_Dot_V := Val;
|
||||
when 'w' =>
|
||||
Debug_Flag_Dot_W := Val;
|
||||
when 'x' =>
|
||||
Debug_Flag_Dot_X := Val;
|
||||
when 'y' =>
|
||||
Debug_Flag_Dot_Y := Val;
|
||||
when 'z' =>
|
||||
Debug_Flag_Dot_Z := Val;
|
||||
end case;
|
||||
end if;
|
||||
end Set_Dotted_Debug_Flag;
|
||||
|
@ -6340,11 +6340,10 @@ package body Exp_Util is
|
||||
if Restriction_Active (No_Finalization) then
|
||||
return False;
|
||||
|
||||
-- C, C++, CIL and Java types are not considered controlled. It is
|
||||
-- assumed that the non-Ada side will handle their clean up.
|
||||
-- C++, CIL and Java types are not considered controlled. It is assumed
|
||||
-- that the non-Ada side will handle their clean up.
|
||||
|
||||
elsif Convention (T) = Convention_C
|
||||
or else Convention (T) = Convention_CIL
|
||||
elsif Convention (T) = Convention_CIL
|
||||
or else Convention (T) = Convention_CPP
|
||||
or else Convention (T) = Convention_Java
|
||||
then
|
||||
|
@ -7,7 +7,7 @@
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 2000-2013, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2000-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- --
|
||||
@ -314,16 +314,24 @@ CND(SIZEOF_unsigned_int, "Size of unsigned int")
|
||||
#endif
|
||||
CND(IOV_MAX, "Maximum writev iovcnt")
|
||||
|
||||
/* NAME_MAX is used to compute the allocation size for a struct dirent
|
||||
* passed to readdir() / readdir_r(). However on some systems it is not
|
||||
* defined, as it is technically a filesystem dependent property that
|
||||
* we should retrieve through pathconf().
|
||||
*/
|
||||
#ifndef NAME_MAX
|
||||
# define NAME_MAX 255
|
||||
# ifdef MAXNAMELEN
|
||||
/* Solaris has no NAME_MAX but defines MAXNAMELEN */
|
||||
# define NAME_MAX MAXNAMELEN
|
||||
# else
|
||||
/* PATH_MAX (maximum length of a full path name) is a safe last
|
||||
* chance fall back.
|
||||
*/
|
||||
# define NAME_MAX PATH_MAX
|
||||
# endif
|
||||
#endif
|
||||
CND(NAME_MAX, "Maximum file name length")
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 1024
|
||||
#endif
|
||||
CND(FILENAME_MAX, "Maximum file path length")
|
||||
|
||||
/*
|
||||
|
||||
---------------------
|
||||
|
Loading…
Reference in New Issue
Block a user