* sem_ch13.adb (Is_Type_Ref): Check that type name is not
parenthesized.
2014-07-18 Vincent Celier <celier@adacore.com>
* s-osinte-vms.ads: Fix style errors.
2014-07-18 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
NAME_MAX and PATH_MAX.
2014-07-18 Bob Duff <duff@adacore.com>
* exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
Build_Record_Or_Elementary_Output_Procedure): For Input and
Output attributes, do not read/write the discriminants if they
have default values; that will be done by Read/Write.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212798
138bc75d-0d04-0410-961f-
82ee72b054a4
2014-07-18 Robert Dewar <dewar@adacore.com>
+ * sem_ch13.adb (Is_Type_Ref): Check that type name is not
+ parenthesized.
+
+2014-07-18 Vincent Celier <celier@adacore.com>
+
+ * s-osinte-vms.ads: Fix style errors.
+
+2014-07-18 Thomas Quinot <quinot@adacore.com>
+
+ * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
+ NAME_MAX and PATH_MAX.
+
+2014-07-18 Bob Duff <duff@adacore.com>
+
+ * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
+ Build_Record_Or_Elementary_Output_Procedure): For Input and
+ Output attributes, do not read/write the discriminants if they
+ have default values; that will be done by Read/Write.
+
+2014-07-18 Robert Dewar <dewar@adacore.com>
+
* sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2013, 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- --
J := 1;
- if Has_Discriminants (B_Typ) then
+ if Has_Discriminants (Typ)
+ and then
+ No (Discriminant_Default_Value (First_Discriminant (Typ)))
+ then
Discr := First_Discriminant (B_Typ);
-- If the prefix subtype is constrained, then retrieve the first
begin
Stms := New_List;
- -- Note that of course there will be no discriminants for the
- -- elementary type case, so Has_Discriminants will be False.
+ -- Note that of course there will be no discriminants for the elementary
+ -- type case, so Has_Discriminants will be False. Note that the
+ -- language rules do not require writing the discriminants in the
+ -- defaulted case, because those are written by 'Write.
- if Has_Discriminants (Typ) then
+ if Has_Discriminants (Typ)
+ and then
+ No (Discriminant_Default_Value (First_Discriminant (Typ)))
+ then
Disc := First_Discriminant (Typ);
while Present (Disc) loop
/* Feature macro definitions */
+/* Define _POSIX_SOURCE to get NAME_MAX, PATH_MAX */
+#define _POSIX_SOURCE
+
#if defined (__linux__) && !defined (_XOPEN_SOURCE)
-/** For Linux _XOPEN_SOURCE must be defined, otherwise IOV_MAX is not defined
- **/
+/* For Linux, define _XOPEN_SOURCE to get IOV_MAX */
#define _XOPEN_SOURCE 500
#endif
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 1995-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- --
type struct_sched_param is record
sched_priority : int; -- scheduling priority
end record;
- for struct_sched_param'Size use 8*4;
+ for struct_sched_param'Size use 8 * 4;
pragma Convention (C, struct_sched_param);
function pthread_setschedparam
sequence : unsigned;
block : pthreadLongAddr_t_ptr;
end record;
- for pthread_cond_t'Size use 8*32;
+ for pthread_cond_t'Size use 8 * 32;
pragma Convention (C, pthread_cond_t);
type pthread_attr_t is record
arg : pthreadLongUint_t;
reserved : pthreadLongUint_array (0 .. 18);
end record;
- for pthread_attr_t'Size use 8*176;
+ for pthread_attr_t'Size use 8 * 176;
pragma Convention (C, pthread_attr_t);
type pthread_mutex_t is record
owner : unsigned;
depth : unsigned;
end record;
- for pthread_mutex_t'Size use 8*40;
+ for pthread_mutex_t'Size use 8 * 40;
pragma Convention (C, pthread_mutex_t);
type pthread_mutexattr_t is record
valid : long;
reserved : pthreadLongUint_array (0 .. 14);
end record;
- for pthread_mutexattr_t'Size use 8*128;
+ for pthread_mutexattr_t'Size use 8 * 128;
pragma Convention (C, pthread_mutexattr_t);
type pthread_condattr_t is record
valid : long;
reserved : pthreadLongUint_array (0 .. 12);
end record;
- for pthread_condattr_t'Size use 8*112;
+ for pthread_condattr_t'Size use 8 * 112;
pragma Convention (C, pthread_condattr_t);
type pthread_key_t is new unsigned;
pragma Inline (Is_Type_Ref);
-- Returns if True if N is a reference to the type for the predicate in
-- the expression (i.e. if it is an identifier whose Chars field matches
- -- the Nam given in the call).
+ -- the Nam given in the call). N must not be parenthesized, if the type
+ -- name appears in parens, this routine will return False.
function Lo_Val (N : Node_Id) return Uint;
-- Given static expression or static range from a Static_Predicate list,
function Is_Type_Ref (N : Node_Id) return Boolean is
begin
- return Nkind (N) = N_Identifier and then Chars (N) = Nam;
+ return Nkind (N) = N_Identifier
+ and then Chars (N) = Nam
+ and then Paren_Count (N) = 0;
end Is_Type_Ref;
------------