Comments (8)
再現手順ありがとうございます。原因と修正方法を調べていきます。
とりあえずビルドを通すのであれば、 -DIUTEST_HAS_HDR_UCHAR=0 を追加して明示的に uchar.h を使わないようにできます。
from iutest.
./mingw64/x86_64-w64-mingw32/include/uchar.h
/* Remember that g++ >= 4.4 defines these types only in c++0x mode */
#if !(defined(__cplusplus) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
!defined(__GNUC__) || \
(__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
typedef uint_least16_t char16_t;
typedef uint_least32_t char32_t;
#endif
$ clang++ -dM -std=c++1z -E -x c++ /dev/null | grep cplus
#define __cplusplus 201406L
$ clang++ -dM -std=c++1z -E -x c++ /dev/null | grep GXX
#define __GXX_ABI_VERSION 1002
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __GXX_RTTI 1
#define __GXX_WEAK__ 1
$ clang++ -dM -std=c++1z -E -x c++ /dev/null | grep GNUC
#define __GNUC_GNU_INLINE__ 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC__ 4
$ clang++ -dM -std=c++1z -fno-ms-compatibility -E -x c++ /dev/null | grep cplus
#define __cplusplus 201406L
$ clang++ -dM -std=c++1z -fno-ms-compatibility -E -x c++ /dev/null | grep GXX
#define __GXX_ABI_VERSION 1002
#define __GXX_EXPERIMENTAL_CXX0X__ 1
#define __GXX_RTTI 1
#define __GXX_WEAK__ 1
$ clang++ -dM -std=c++1z -fno-ms-compatibility -E -x c++ /dev/null | grep GNU
#define __GNUC_GNU_INLINE__ 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC__ 4
#define __GNUG__ 4
どうも__GNUC__ == 4 && __GNUC_MINOR__ < 4
に引っかかっている様子。これはmingw側の問題か
from iutest.
// include
#include "../internal/iutest_charcode.hpp"
#if IUTEST_HAS_HDR_UCHAR && !(defined(__MINGW32__) && defined(__GNUC__) && defined(__clang__))
# include <uchar.h>
#endif
とかしておけばとりあえず回避できそうではあるが、mingw clangでchar16_t
とchar32_t
がビルトインされたのいつだったろうか。
from iutest.
uchar.h ではなく cuchar ヘッダーを使うように変更しました。
再現環境ではエラーが出ないようになりました。
from iutest.
手元ではエラーは出なくなりました。
ところで例えばwandboxのclangだとcuchar
はなかったりするんですが、大丈夫ですか?
from iutest.
cuchar は char16_t/char32_t 文字列を人が読める出力に変換するためにインクルードしているのですが、 codecvt が使える場合はそちらを優先的に使います。
影響範囲としては、 codecvt が使えないケース、かつ、 char16_t/char32_t 文字列をテストに利用している場合に限られるので、狭いと思っています。
実は、この辺のコードはあんまりテスト、動作確認してなくて怪しかったりします…
なので、今回は機能が使えることよりもコンパイルが通ることを優先して修正しました。
文字コード関係の対応をしっかりするときに、見直したいと思います。
from iutest.
文字コードは闇しか無いですからねぇ・・・。そもそもmingwの場合char以外使えないに等しかったりしますし、localeは控えめに言って腐ってますし・・・。
ではcloseします。
from iutest.
upstreamで修正入ったぽい。
https://github.com/Alexpux/MINGW-packages/issues/1541#issuecomment-254239608
Fix commited upstream https://sourceforge.net/p/mingw-w64/mingw-w64/ci/1a9621b7348db058b8d76dd64cb0269f9d998aa5/
from iutest.
Related Issues (20)
- WINE test HOT 1
- Travis CI new plan limit.. HOT 1
- move fused-src test
- AppVeyor: use fan-in/out
- Google Test v1.11.0 compatibility
- std::addressof
- The Shippable service will no longer be available as of May 3rd, 2021 HOT 1
- -m96bit-long-double, -mlong-double-64/80/128 対応
- floating_point impliment change to bit_cast(or memcpy)
- Support PowerPC
- FilePath method bug
- VS2022 support
- Google Test v1.1X compatibility
- IUTEST_ASSERT_EXIT が DeathTest の ASSERT_EXIT と命名ルールが被っている
- GenerateUniqueFileName
- パラメタライズドテストの DSL エラーメッセージに file:line を追加
- std::span を使う
- recreate_environments_when_repeating flag
- --gtest_fail_fast
- Codefresh: No space left on device HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iutest.