aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/ada-tree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-11-30 11:25:24 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-11-30 11:25:24 +0000
commit14ecca2eea820447afe3214ed635883fbc4244a4 (patch)
treef39c21c5d4e4d43f3da54dd3ba8f3ce53a526182 /gcc/ada/gcc-interface/ada-tree.h
parent6501d5fea036e5d7c4f5f8037f217b6e8d07a60d (diff)
downloadgcc-14ecca2eea820447afe3214ed635883fbc4244a4.zip
gcc-14ecca2eea820447afe3214ed635883fbc4244a4.tar.gz
gcc-14ecca2eea820447afe3214ed635883fbc4244a4.tar.bz2
ada-tree.h (TYPE_MAX_ALIGN): New macro.
* gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): New macro. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set PACKED to -2. Remove obsolete code setting the alignment on some atomic types. When the type has no alignment but needs strict alignment and has a size clause, compute a maximum alignment and set it on the type. (adjust_packed): Remove handling of -2 argument. Deal with TYPE_ALIGN and TYPE_MAX_ALIGN directly. (gnat_to_gnu_field): Do not document -2 as argument. (components_to_record): Likewise. * gcc-interface/utils.c (finish_record_type): Do not bump alignment of the record type beyond TYPE_MAX_ALIGN. Reset the latter on exit. * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): Move around. (GNATLIBCFLAGS_FOR_C): Reformat. (GCC_CFLAGS): Delete. From-SVN: r231062
Diffstat (limited to 'gcc/ada/gcc-interface/ada-tree.h')
-rw-r--r--gcc/ada/gcc-interface/ada-tree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/ada-tree.h b/gcc/ada/gcc-interface/ada-tree.h
index 4e368f0..5d93ea4 100644
--- a/gcc/ada/gcc-interface/ada-tree.h
+++ b/gcc/ada/gcc-interface/ada-tree.h
@@ -176,6 +176,10 @@ do { \
/* True if TYPE can alias any other types. */
#define TYPE_UNIVERSAL_ALIASING_P(NODE) TYPE_LANG_FLAG_6 (NODE)
+/* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, this holds the maximum
+ alignment value the type ought to have. */
+#define TYPE_MAX_ALIGN(NODE) (TYPE_PRECISION (RECORD_OR_UNION_CHECK (NODE)))
+
/* For an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the
template and the object.