From 59f3dd0a14fa4d4ce7ee142068cf9c5e376efc27 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Thu, 9 Apr 2009 14:57:47 +0200 Subject: [multiple changes] 2009-04-09 Robert Dewar * sem_ch5.adb: Minor reformatting 2009-04-09 Vincent Celier * vms_data.ads: Change GNAT CHECK qualifier /DIAGNOSIS_LIMIT to /DIAGNOSTIC_LIMIT New qualifier /LEXPAND_SOURCE=nnn for -gnatGnnn New qualifier /LXDEBUG=nnn for -gnatDnnn For H820-010 * gnat_ugn.texi: Update documentation for VMS qualifiers equivalent to -gnatGnn and -gnatDnn 2009-04-09 Nicolas Setton * s-osinte-darwin.ads: (Pad_Type): Make this an array of unsigned_long, to match layout of siginfo_t in sys/signal.h. * gcc-interface/Makefile.in: Add section for x86_64 darwin. 2009-04-09 Thomas Quinot * g-socket.ads: (Fd_Set): Use Interfaces.C.long alignment. 2009-04-09 Nicolas Setton * s-oscons-tmplt.c: Allow long lines in the generated spec. Add generation of Darwin-specific constants needed when binding to the pthread library. From-SVN: r145837 --- gcc/ada/ChangeLog | 47 +++++++++++++++++++++++++++++++++++++++ gcc/ada/g-socket.ads | 2 +- gcc/ada/gcc-interface/Makefile.in | 20 ++++++++++++++++- gcc/ada/gnat_ugn.texi | 14 ++++++++++-- gcc/ada/s-oscons-tmplt.c | 47 +++++++++++++++++++++++++++++++++++++++ gcc/ada/s-osinte-darwin.ads | 15 +++++++------ gcc/ada/sem_ch5.adb | 4 ++-- gcc/ada/vms_data.ads | 47 +++++++++++++++++++++++++++++---------- 8 files changed, 171 insertions(+), 25 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 0d2b8a0..191ef1a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,52 @@ 2009-04-09 Robert Dewar + * sem_ch5.adb: Minor reformatting + +2009-04-09 Vincent Celier + + * vms_data.ads: + Change GNAT CHECK qualifier /DIAGNOSIS_LIMIT to /DIAGNOSTIC_LIMIT + New qualifier /LEXPAND_SOURCE=nnn for -gnatGnnn + New qualifier /LXDEBUG=nnn for -gnatDnnn + For H820-010 + + * gnat_ugn.texi: + Update documentation for VMS qualifiers equivalent to -gnatGnn and + -gnatDnn + +2009-04-09 Nicolas Setton + + * s-osinte-darwin.ads: (Pad_Type): Make this an array of unsigned_long, + to match layout of siginfo_t in sys/signal.h. + + * gcc-interface/Makefile.in: Add section for x86_64 darwin. + +2009-04-09 Thomas Quinot + + * g-socket.ads: (Fd_Set): Use Interfaces.C.long alignment. + +2009-04-09 Nicolas Setton + + * s-oscons-tmplt.c: Allow long lines in the generated spec. + Add generation of Darwin-specific constants needed when binding to the + pthread library. + +2009-04-09 Robert Dewar + + * checks.adb: + (Insert_Valid_Check): Avoid unnecessary generation of junk declaration + when no invalid values exist, Avoid duplicate read of atomic variable. + + * cstand.adb (Build_Signed_Integer_Type): Set Is_Known_Valid + (Standard_Unsigned): Set Is_Known_Valid + + * sem_ch3.adb (Analyze_Subtype_Declaration): Copy Is_Known_Valid on + subtype declaration if no constraint. + (Set_Modular_Size): Set Is_Known_Valid if appropriate + (Build_Derived_Numeric_Type): Copy Is_Known_Valid if no constraint + +2009-04-09 Robert Dewar + * switch-c.adb, gnat_ugn.texi, vms_data.ads, switch.adb, switch.ads: for numeric switches, an optional equal sign is always allowed. diff --git a/gcc/ada/g-socket.ads b/gcc/ada/g-socket.ads index 3910778..eab3c30 100644 --- a/gcc/ada/g-socket.ads +++ b/gcc/ada/g-socket.ads @@ -1095,7 +1095,7 @@ private type Fd_Set is new System.Storage_Elements.Storage_Array (1 .. SOSC.SIZEOF_fd_set); - for Fd_Set'Alignment use Interfaces.C.int'Alignment; + for Fd_Set'Alignment use Interfaces.C.long'Alignment; type Fd_Set_Access is access all Fd_Set; pragma Convention (C, Fd_Set_Access); diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index c431118..8d0d92c 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1729,7 +1729,25 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),) LIBGNAT_TARGET_PAIRS += \ system.ads #endif +#ifdef __APPLE__ +# include <_types.h> +#endif + #ifdef NATIVE #include #define CND(name,comment) \ @@ -1205,6 +1212,46 @@ CND(WSAEDISCON, "Disconnected") putchar ('\n'); #endif +#ifdef __APPLE__ +/* + + ------------------------------- + -- Darwin-specific constants -- + ------------------------------- + + -- These constants may be used only within the Darwin version of the GNAT + -- runtime library. +*/ + +#define PTHREAD_SIZE __PTHREAD_SIZE__ +CND(PTHREAD_SIZE, "Pad in pthread_t") + +#define PTHREAD_ATTR_SIZE __PTHREAD_ATTR_SIZE__ +CND(PTHREAD_ATTR_SIZE, "Pad in pthread_attr_t") + +#define PTHREAD_MUTEXATTR_SIZE __PTHREAD_MUTEXATTR_SIZE__ +CND(PTHREAD_MUTEXATTR_SIZE, "Pad in pthread_mutexattr_t") + +#define PTHREAD_MUTEX_SIZE __PTHREAD_MUTEX_SIZE__ +CND(PTHREAD_MUTEX_SIZE, "Pad in pthread_mutex_t") + +#define PTHREAD_CONDATTR_SIZE __PTHREAD_CONDATTR_SIZE__ +CND(PTHREAD_CONDATTR_SIZE, "Pad in pthread_condattr_t") + +#define PTHREAD_COND_SIZE __PTHREAD_COND_SIZE__ +CND(PTHREAD_COND_SIZE, "Pad in pthread_cond_t") + +#define PTHREAD_RWLOCKATTR_SIZE __PTHREAD_RWLOCKATTR_SIZE__ +CND(PTHREAD_RWLOCKATTR_SIZE, "Pad in pthread_rwlockattr_t") + +#define PTHREAD_RWLOCK_SIZE __PTHREAD_RWLOCK_SIZE__ +CND(PTHREAD_RWLOCK_SIZE, "Pad in pthread_rwlock_t") + +#define PTHREAD_ONCE_SIZE __PTHREAD_ONCE_SIZE__ +CND(PTHREAD_ONCE_SIZE, "Pad in pthread_once_t") + +#endif + /* end System.OS_Constants; diff --git a/gcc/ada/s-osinte-darwin.ads b/gcc/ada/s-osinte-darwin.ads index d53e2c4..2a3b928 100644 --- a/gcc/ada/s-osinte-darwin.ads +++ b/gcc/ada/s-osinte-darwin.ads @@ -41,6 +41,7 @@ -- Elaborate_Body. It is designed to be a bottom-level (leaf) package. with Interfaces.C; +with System.OS_Constants; package System.OS_Interface is pragma Preelaborate; @@ -532,7 +533,7 @@ private -- -- Darwin specific signal implementation -- - type Pad_Type is array (1 .. 7) of unsigned; + type Pad_Type is array (1 .. 7) of unsigned_long; type siginfo_t is record si_signo : int; -- signal number si_errno : int; -- errno association @@ -568,37 +569,37 @@ private type pthread_attr_t is record sig : long; - opaque : padding (1 .. 36); + opaque : padding (1 .. System.OS_Constants.PTHREAD_ATTR_SIZE); end record; pragma Convention (C, pthread_attr_t); type pthread_mutexattr_t is record sig : long; - opaque : padding (1 .. 8); + opaque : padding (1 .. System.OS_Constants.PTHREAD_MUTEXATTR_SIZE); end record; pragma Convention (C, pthread_mutexattr_t); type pthread_mutex_t is record sig : long; - opaque : padding (1 .. 40); + opaque : padding (1 .. System.OS_Constants.PTHREAD_MUTEX_SIZE); end record; pragma Convention (C, pthread_mutex_t); type pthread_condattr_t is record sig : long; - opaque : padding (1 .. 4); + opaque : padding (1 .. System.OS_Constants.PTHREAD_CONDATTR_SIZE); end record; pragma Convention (C, pthread_condattr_t); type pthread_cond_t is record sig : long; - opaque : padding (1 .. 24); + opaque : padding (1 .. System.OS_Constants.PTHREAD_COND_SIZE); end record; pragma Convention (C, pthread_cond_t); type pthread_once_t is record sig : long; - opaque : padding (1 .. 4); + opaque : padding (1 .. System.OS_Constants.PTHREAD_ONCE_SIZE); end record; pragma Convention (C, pthread_once_t); diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb index 6ae5d7f..6a387d6 100644 --- a/gcc/ada/sem_ch5.adb +++ b/gcc/ada/sem_ch5.adb @@ -88,8 +88,8 @@ package body Sem_Ch5 is Decl : Node_Id; procedure Diagnose_Non_Variable_Lhs (N : Node_Id); - -- N is the node for the left hand side of an assignment, and it - -- is not a variable. This routine issues an appropriate diagnostic. + -- N is the node for the left hand side of an assignment, and it is not + -- a variable. This routine issues an appropriate diagnostic. procedure Kill_Lhs; -- This is called to kill current value settings of a simple variable diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index 2909765..ada55a3 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -774,16 +774,16 @@ package VMS_Data is -- -- Use full source locations references in the report file. - S_Diagnosis : aliased constant S := "/DIAGNOSIS_LIMIT=#" & + S_Diagnosis : aliased constant S := "/DIAGNOSTIC_LIMIT=#" & "-m#"; - -- /DIAGNOSIS_LIMIT=500 (D) - -- /ERROR_LIMIT=nnn + -- /DIAGNOSTIC_LIMIT=500 (D) + -- /DIAGNOSTIC_LIMIT=nnn -- -- NNN is a decimal integer in the range of 1 to 1000 and limits the -- number of diagnostic messages to be generated into Stdout to that -- number. Once that number has been reached, gnatcheck stops -- to print out diagnoses into Stderr. If NNN is equal to 0, this means - -- that there is no limit on the number of diagnoses in Stdout + -- that there is no limit on the number of diagnoses in Stdout. S_Check_Mess : aliased constant S := "/MESSAGES_PROJECT_FILE=" & "DEFAULT " & @@ -1484,15 +1484,23 @@ package VMS_Data is "-gnatm999999"; -- NODOC (see /ERROR_LIMIT) - S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE=#" & + S_GCC_Expand : aliased constant S := "/EXPAND_SOURCE " & "-gnatG"; - -- /NOEXPAND_SOURCE[=nnn] (D) + -- /NOEXPAND_SOURCE (D) -- /EXPAND_SOURCE -- -- Produces a listing of the expanded code in Ada source form. For -- example, all tasking constructs are reduced to appropriate run-time + -- library calls. The maximum line length for the listing 72. + + S_GCC_Lexpand : aliased constant S := "/LEXPAND_SOURCE=#" & + "-gnatG#"; + -- /LEXPAND_SOURCE=nnn + -- + -- Produces a listing of the expanded code in Ada source form. For + -- example, all tasking constructs are reduced to appropriate run-time -- library calls. The parameter is the maximum line length for the - -- listing (default is 72). + -- listing. S_GCC_Extend : aliased constant S := "/EXTENSIONS_ALLOWED " & "-gnatX"; @@ -3330,9 +3338,9 @@ package VMS_Data is "-gnatWn"; -- NODOC (see /WIDE_CHARACTER_ENCODING) - S_GCC_Xdebug : aliased constant S := "/XDEBUG=#" & - "-gnatD"; - -- /NOXDEBUG[=nnn] (D) + S_GCC_Xdebug : aliased constant S := "/XDEBUG " & + "-gnatD"; + -- /NOXDEBUG (D) -- /XDEBUG -- -- Output expanded source files for source level debugging. @@ -3342,8 +3350,21 @@ package VMS_Data is -- refer to the generated file. This allows source level debugging using -- the generated code which is sometimes useful for complex code, for -- example to find out exactly which part of a complex construction - -- raised an exception. The parameter if present is the maximum line - -- length for the output (default 72). + -- raised an exception. The maximum line length for the output is 72. + + S_GCC_Lxdebug : aliased constant S := "/LXDEBUG=#" & + "-gnatD=#"; + -- /LXDEBUG=nnn + -- + -- Output expanded source files for source level debugging. + -- The expanded source (see /EXPAND_SOURCE) is written to files + -- with names formed by appending "_DG" to the input file name, + -- The debugging information generated by the /DEBUG qualifier will then + -- refer to the generated file. This allows source level debugging using + -- the generated code which is sometimes useful for complex code, for + -- example to find out exactly which part of a complex construction + -- raised an exception. The parameter is the maximum line length for + -- the output. S_GCC_Xref : aliased constant S := "/XREF=" & "GENERATE " & @@ -3383,6 +3404,7 @@ package VMS_Data is S_GCC_Error 'Access, S_GCC_ErrorX 'Access, S_GCC_Expand 'Access, + S_GCC_Lexpand 'Access, S_GCC_Extend 'Access, S_GCC_Ext 'Access, S_GCC_File 'Access, @@ -3446,6 +3468,7 @@ package VMS_Data is S_GCC_No_Back 'Access, S_GCC_All_Back'Access, S_GCC_Xdebug 'Access, + S_GCC_Lxdebug 'Access, S_GCC_Xref 'Access); ---------------------------- -- cgit v1.1