diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-11-26 07:04:56 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-11-26 08:05:32 +0100 |
commit | 28369ecb5d4184f4bed8cccd9e8e018a3d985c75 (patch) | |
tree | c3724fb4165b272219d0684d097678449e309e95 /tests | |
parent | b92f064e9bf0cb4fdf725d462d019141e3c6b6f0 (diff) | |
download | bison-28369ecb5d4184f4bed8cccd9e8e018a3d985c75.tar.gz |
tests: avoid creating files whose name collide with standard headers
Having a file named "exception" is risky: the compiler might use that
file in #include.
Reported by 马俊 <majun123@whu.edu.cn>.
* tests/local.at (AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR): Generate
'exceptions', not 'exception'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/local.at | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/local.at b/tests/local.at index 43de4abc..152c462a 100644 --- a/tests/local.at +++ b/tests/local.at @@ -1199,7 +1199,7 @@ m4_ifval([$2], # Check that we can expect exceptions to be handled properly. # GCC 4.3 and 4.4 fail https://trac.macports.org/ticket/40853. m4_define([AT_SKIP_IF_EXCEPTION_SUPPORT_IS_POOR], -[AT_DATA_SOURCE([exception.cc], +[AT_DATA_SOURCE([exceptions.cc], [[#include <iostream> #include <stdexcept> @@ -1230,10 +1230,9 @@ int main () return 1; } ]]) -AT_COMPILE_CXX([exception]) -# The "empty" quadrigraph is to protect from cfg.mk's -# sc_at_parser_check. -AT_CHECK([@&t@./exception || exit 77], [0], [], [ignore]) +AT_COMPILE_CXX([exceptions]) +# The "empty" quadrigraph is to protect from cfg.mk's sc_at_parser_check. +AT_CHECK([@&t@./exceptions || exit 77], [0], [], [ignore]) ]) |