summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorVitaly Cheptsov <4348897+vit9696@users.noreply.github.com>2021-10-04 16:20:47 +0300
committerGitHub <noreply@github.com>2021-10-04 06:20:47 -0700
commit14ffe7bc486805c568403757d8634211f8458451 (patch)
tree991da5b6498df6bd37d1bc855dbf325c33f96ad4 /utils
parent007e79e5ba45d3f3c4325578a91f7786a7b88cfb (diff)
downloadpycparser-14ffe7bc486805c568403757d8634211f8458451.tar.gz
Implement _Alignas and _Alignof support with tests (#435)
* Implement _Alignas and _Alignof support with tests * Improve testing and avoid unnecessary alignas for typedef * Add more tests * Drop legacy artifact * Remove extra _add_declaration_specifier call * Drop custom equality comparators for now Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/fake_libc_include/_fake_defines.h6
-rw-r--r--utils/fake_libc_include/stdalign.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/utils/fake_libc_include/_fake_defines.h b/utils/fake_libc_include/_fake_defines.h
index 86b5c66..678cffc 100644
--- a/utils/fake_libc_include/_fake_defines.h
+++ b/utils/fake_libc_include/_fake_defines.h
@@ -251,4 +251,10 @@
#define ATOMIC_FLAG_INIT { 0 }
#define kill_dependency(y) (y)
+/* C11 stdalign.h defines */
+#define alignas _Alignas
+#define alignof _Alignof
+#define __alignas_is_defined 1
+#define __alignof_is_defined 1
+
#endif
diff --git a/utils/fake_libc_include/stdalign.h b/utils/fake_libc_include/stdalign.h
new file mode 100644
index 0000000..f952c1d
--- /dev/null
+++ b/utils/fake_libc_include/stdalign.h
@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"