summaryrefslogtreecommitdiffstats
path: root/config/cmake/H5pubconf.h.in
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2022-04-16 15:21:18 (GMT)
committerGitHub <noreply@github.com>2022-04-16 15:21:18 (GMT)
commita80897ee4944ff6008bfb3b93619ebcb58a070d1 (patch)
treef01b999aa5168e6869e4cf35c073377e3db09cd7 /config/cmake/H5pubconf.h.in
parent463ef39bc777340b731903995a2ad416ec5e0ae4 (diff)
downloadhdf5-a80897ee4944ff6008bfb3b93619ebcb58a070d1.zip
hdf5-a80897ee4944ff6008bfb3b93619ebcb58a070d1.tar.gz
hdf5-a80897ee4944ff6008bfb3b93619ebcb58a070d1.tar.bz2
Remove H5_NO_ALIGNMENT_RESTRICTIONS (#1426)
* Do not conditionally compile code that uses a pointer dereference and assignment to copy a potentially unaligned variable to aligned automatic storage, or vice versa. Instead, always use naked `memcpy(3)`s. Disassembling the generated code reveals that the `memcpy(3)`s optimize (`-O3`) to a single `mov` instruction for x86_64, which is not strict about alignment. This change reduces the size of code and scripts by 143 lines, eases our way to cross-compilation, and avoids invoking undefined behavior. * Committing clang-format changes * Per discussion, use HD and add comments. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'config/cmake/H5pubconf.h.in')
-rw-r--r--config/cmake/H5pubconf.h.in3
1 files changed, 0 insertions, 3 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 4956c97..9a581cb 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -434,9 +434,6 @@
/* Define to enable internal memory allocation sanity checking. */
#cmakedefine H5_MEMORY_ALLOC_SANITY_CHECK @H5_MEMORY_ALLOC_SANITY_CHECK@
-/* Define if we can violate pointer alignment restrictions */
-#cmakedefine H5_NO_ALIGNMENT_RESTRICTIONS @H5_NO_ALIGNMENT_RESTRICTIONS@
-
/* Define if deprecated public API symbols are disabled */
#cmakedefine H5_NO_DEPRECATED_SYMBOLS @H5_NO_DEPRECATED_SYMBOLS@