aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-05-28 19:06:01 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-05-28 19:35:42 +0200
commit399d84da3708719b063953107bab0f5f6493addb (patch)
treefdb2ae28f1fa4df5ce20b99d15ae669a72ddd744 /configure.ac
parentea3e9e0b84c57df4110ca9e5ccced65c5bbe4611 (diff)
build: Only allow ASCII identifiers
While emoji and other symbols in C++ identifers (as accepted by newer compilers) are fun, they might create confusion during code review, for example because some symbols look very similar. Forbid such extended identifiers for now. This is done by providing `-fno-extended-identifiers`. Thanks to sipa for suggesting this compiler flag.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 28015d005d..34b8354cda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -422,6 +422,9 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy],[NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"],,[[$CXXFLAG_WERROR]])
fi
+dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
+AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers],[[CXXFLAGS="$CXXFLAGS -fno-extended-identifiers"]],,[[$CXXFLAG_WERROR]])
+
enable_sse42=no
enable_sse41=no
enable_avx2=no