diff options
author | Olivier Hainque <hainque@adacore.com> | 2008-07-19 17:49:18 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2008-07-19 17:49:18 +0000 |
commit | 953316147f5c41b3a0822ca63b39ea4ce2d942cd (patch) | |
tree | 795260e8dc7f7962b579f40cd7ab751d17f86412 /gcc/defaults.h | |
parent | d1a296c11ab091c896267dee5a3d831731fd3143 (diff) | |
download | gcc-953316147f5c41b3a0822ca63b39ea4ce2d942cd.zip gcc-953316147f5c41b3a0822ca63b39ea4ce2d942cd.tar.gz gcc-953316147f5c41b3a0822ca63b39ea4ce2d942cd.tar.bz2 |
tm.texi (MALLOC_ABI_ALIGNMENT): New macro.
* 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.
From-SVN: r137984
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index 3eecd8d..8029430 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 |