summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-29 12:53:24 +0000
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>2017-09-29 12:53:24 +0000
commit2ac7a5c975533678aa3a8ad9197256d29912f9e6 (patch)
treefb72d81fbf379d5d9c327cfb9b48ec4427952477
parent222d5c496e3713cc2fa46d0ff24ca111ca2fcc95 (diff)
downloadgcc-2ac7a5c975533678aa3a8ad9197256d29912f9e6.tar.gz
2017-09-29 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false redundant warnings. 2017-09-29 Yannick Moy <moy@adacore.com> * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion. 2017-09-29 Eric Botcazou <ebotcazou@adacore.com> * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording. * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment): Document the effect of pragma Optimize_Alignment (Space) on non-packed record types. * gnat_rm.texi: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253284 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog17
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst3
-rw-r--r--gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst2
-rw-r--r--gcc/ada/gnat_rm.texi7
-rw-r--r--gcc/ada/sem_ch8.adb2
-rw-r--r--gcc/ada/sinput-c.adb2
6 files changed, 27 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2657531cf36..582dcbbc845 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,20 @@
+2017-09-29 Justin Squirek <squirek@adacore.com>
+
+ * sem_ch8.adb (Note_Redundant_Use): Add guard to protect against false
+ redundant warnings.
+
+2017-09-29 Yannick Moy <moy@adacore.com>
+
+ * sinput-c.adb: Remove unused with-clause on Ada.Unchecked_Conversion.
+
+2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * doc/gnat_rm/representation_clauses_and_pragmas.rst: Minor rewording.
+ * doc/gnat_rm/implementation_defined_pragmas.rst (Optimize_Alignment):
+ Document the effect of pragma Optimize_Alignment (Space) on non-packed
+ record types.
+ * gnat_rm.texi: Regenerate.
+
2017-09-25 Justin Squirek <squirek@adacore.com>
* aspects.adb, bindgen.adb, clean.adb, erroutc.adb, exp_ch13.adb,
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 305301338cf..1281758ac16 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -4120,6 +4120,9 @@ Specifying SPACE also disables alignment promotions for standalone objects,
which occur when the compiler increases the alignment of a specific object
without changing the alignment of its type.
+Specifying SPACE also disables component reordering in unpacked record types,
+which can result in larger sizes in order to meet alignment requirements.
+
Specifying TIME causes larger default alignments to be chosen in the case of
small types with sizes that are not a power of 2. For example, consider:
diff --git a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
index 8ff52240206..5ad8e037484 100644
--- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst
@@ -64,7 +64,7 @@ values are as follows:
* *Records*.
- For the normal non-packed case, the alignment of a record is equal to
+ For the normal unpacked case, the alignment of a record is equal to
the maximum alignment of any of its components. For tagged records, this
includes the implicit access type used for the tag. If a pragma ``Pack``
is used and all components are packable (see separate section on pragma
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 21b5c7149d4..8ed58c4fc7f 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -21,7 +21,7 @@
@copying
@quotation
-GNAT Reference Manual , Sep 13, 2017
+GNAT Reference Manual , Sep 29, 2017
AdaCore
@@ -5547,6 +5547,9 @@ Specifying SPACE also disables alignment promotions for standalone objects,
which occur when the compiler increases the alignment of a specific object
without changing the alignment of its type.
+Specifying SPACE also disables component reordering in unpacked record types,
+which can result in larger sizes in order to meet alignment requirements.
+
Specifying TIME causes larger default alignments to be chosen in the case of
small types with sizes that are not a power of 2. For example, consider:
@@ -18099,7 +18102,7 @@ will be as described for elementary types, e.g. a packed array of length
@item
@emph{Records}.
-For the normal non-packed case, the alignment of a record is equal to
+For the normal unpacked case, the alignment of a record is equal to
the maximum alignment of any of its components. For tagged records, this
includes the implicit access type used for the tag. If a pragma @code{Pack}
is used and all components are packable (see separate section on pragma
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index d86818abd49..3eec5717f68 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -9322,7 +9322,7 @@ package body Sem_Ch8 is
end if;
- if Present (Redundant) then
+ if Present (Redundant) and then Parent (Redundant) /= Prev_Use then
-- Make sure we are looking at most-descendant use_package_clause
-- by traversing the chain with Find_Most_Prev and then verifying
-- there is no scope manipulation via Most_Descendant_Use_Clause.
diff --git a/gcc/ada/sinput-c.adb b/gcc/ada/sinput-c.adb
index fe9285c873e..645f0da647b 100644
--- a/gcc/ada/sinput-c.adb
+++ b/gcc/ada/sinput-c.adb
@@ -28,8 +28,6 @@ with Opt; use Opt;
with Output; use Output;
with System; use System;
-with Ada.Unchecked_Conversion;
-
pragma Warnings (Off);
-- This package is used also by gnatcoll
with System.OS_Lib; use System.OS_Lib;