aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-04-29 17:24:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-04-29 17:24:56 +0200
commitd935a36e27c5a15e05cabdc6b6e9b6d68538a14f (patch)
tree32aad4e68b4052f7ce71c58540a2b80a90d67674 /gcc/ada/decl.c
parent56141a6ad7f965b156427f25ab45bd1093b0b565 (diff)
downloadgcc-d935a36e27c5a15e05cabdc6b6e9b6d68538a14f.zip
gcc-d935a36e27c5a15e05cabdc6b6e9b6d68538a14f.tar.gz
gcc-d935a36e27c5a15e05cabdc6b6e9b6d68538a14f.tar.bz2
[multiple changes]
2004-04-29 Ed Schonberg <schonberg@gnat.com> * checks.adb (Enable_Range_Check): If the prefix of an index component is an access to an unconstrained array, perform check unconditionally. 2004-04-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * decl.c (gnat_to_gnu_field): Also call make_packable_type if Component_Clause. 2004-04-29 Olivier Hainque <hainque@act-europe.fr> * init.c (__gnat_install_handler, __gnat_error_handler): Remove alternate stack setting. There was no support for the tasking cases and the changes eventually caused a number of side-effect failures in the non-tasking case too. 2004-04-29 Eric Botcazou <ebotcazou@act-europe.fr> lang-specs.h: Redirect output to /dev/null if -gnatc or -gnatz or -gnats is passed. 2004-04-29 Vincent Celier <celier@gnat.com> * make.adb (Gnatmake): Increase max size of argument array for gnatbind for the potential addition of -F. If there are Stand-Alone Library projects, invoke gnatbind with -F to be sure that elaboration flags will be checked. * switch-c.adb: Correct call to Scan_Pos for -gnateI 2004-04-29 Thomas Quinot <quinot@act-europe.fr> * sem_warn.adb (Check_References): Move '<access-variable> may be null' warning out of under Warn_On_No_Value_Assigned. 2004-04-29 Ed Falis <falis@gnat.com> * gnat_ugn.texi: Fixed texi error 2004-04-29 Robert Dewar <dewar@gnat.com> * sem_ch4.adb (Remove_Abstract_Operations): Unconditionally remove abstract operations if they come from predefined files. * gnat_rm.texi: Fix bad doc for pragma Elaboration_Checks (should be Dynamic, not RM). * s-addope.adb: Correct obvious error in mod function From-SVN: r81289
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 73c35c5..92e1342 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -4998,11 +4998,11 @@ gnat_to_gnu_field (Entity_Id gnat_field,
&& TYPE_LEFT_JUSTIFIED_MODULAR_P (gnu_field_type))
gnu_field_type = TREE_TYPE (TYPE_FIELDS (gnu_field_type));
- /* If we are packing this record or we have a specified size that's
- smaller than that of the field type and the field type is also a record
- that's BLKmode and with a small constant size, see if we can get a
- better form of the type that allows more packing. If we can, show
- a size was specified for it if there wasn't one so we know to
+ /* If we are packing this record, have a specified size that's smaller than
+ that of the field type, or a position is specified, and the field type
+ is also a record that's BLKmode and with a small constant size, see if
+ we can get a better form of the type that allows more packing. If we
+ can, show a size was specified for it if there wasn't one so we know to
make this a bitfield and avoid making things wider. */
if (TREE_CODE (gnu_field_type) == RECORD_TYPE
&& TYPE_MODE (gnu_field_type) == BLKmode
@@ -5010,7 +5010,8 @@ gnat_to_gnu_field (Entity_Id gnat_field,
&& compare_tree_int (TYPE_SIZE (gnu_field_type), BIGGEST_ALIGNMENT) <= 0
&& (packed
|| (gnu_size != 0 && tree_int_cst_lt (gnu_size,
- TYPE_SIZE (gnu_field_type)))))
+ TYPE_SIZE (gnu_field_type)))
+ || Present (Component_Clause (gnat_field))))
{
gnu_field_type = make_packable_type (gnu_field_type);