summaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-19 17:49:18 +0000
committerhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-19 17:49:18 +0000
commit65c05dfdcfbd74e48f5432af9d7561bd4cba5ce9 (patch)
tree795260e8dc7f7962b579f40cd7ab751d17f86412 /gcc/defaults.h
parentbf3431bdaba9ed43e0de9dac4a29e18b0f7b280d (diff)
downloadgcc-65c05dfdcfbd74e48f5432af9d7561bd4cba5ce9.tar.gz
* doc/tm.texi (MALLOC_ABI_ALIGNMENT): New macro. Alignment, in bits,
a C conformant malloc implementation has to provide. * defaults.h (MALLOC_ABI_ALIGNMENT): Default to BITS_PER_WORD. ada/ * targtyps.c (get_target_default_allocator_alignment): Use it. testsuite/ * gcc.dg/mallign.c: New test. * gnat.dg/allocator_maxalign1.adb: New test. * gnat.dg/test_allocator_maxalign2.adb: Main caller for ... * gnat.dg/allocator_maxalign2.ad[bs]: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137984 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r--gcc/defaults.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 3eecd8db81a..80294305850 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -551,6 +551,12 @@ along with GCC; see the file COPYING3. If not see
#define PUSH_ARGS_REVERSED 0
#endif
+/* Default value for the alignment (in bits) a C conformant malloc has to
+ provide. This default is intended to be safe and always correct. */
+#ifndef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT BITS_PER_WORD
+#endif
+
/* If PREFERRED_STACK_BOUNDARY is not defined, set it to STACK_BOUNDARY.
STACK_BOUNDARY is required. */
#ifndef PREFERRED_STACK_BOUNDARY