From 60e9cc86d91d23465bb79751c772ec87d05bae13 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 11 Sep 2022 00:48:56 +0200 Subject: [PATCH] stdbool C++ tests: Fix compilation error with MSVC14 (regr. from today). * tests/test-stdbool-c++.cc (s): Choose field names that are not type names. --- ChangeLog | 4 ++++ tests/test-stdbool-c++.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bdec7ddfa2..5dda053d58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2022-09-10 Bruno Haible + stdbool C++ tests: Fix compilation error with MSVC14 (regr. from today). + * tests/test-stdbool-c++.cc (s): Choose field names that are not type + names. + Reorganize C++ tests for stdbool and stdbool-c99. * tests/test-stdbool-c++.cc: Don't include if TEST_STDBOOL_H is not defined. Add a couple of simple tests, from test-stdbool.c. diff --git a/tests/test-stdbool-c++.cc b/tests/test-stdbool-c++.cc index 8e208dfe23..98358f1ef8 100644 --- a/tests/test-stdbool-c++.cc +++ b/tests/test-stdbool-c++.cc @@ -33,7 +33,7 @@ "error: true is not 1" #endif -struct s { bool s: 1; bool t; } s; +struct s { bool u: 1; bool v; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; -- 2.39.5