[libcxx-commits] [PATCH] D151046: [libcxx][tests] Introduce 32-bit feature and use it for stringstream gcount test
Azat Khuzhin via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 22 10:22:43 PDT 2023
azat added inline comments.
================
Comment at: libcxx/utils/libcxx/test/features.py:385
+
+ Feature(name='32-bit', when=lambda cfg: int(compilerMacros(cfg)['__SIZEOF_SIZE_T__']) == 4),
]
----------------
ldionne wrote:
> Mordante wrote:
> > I'm not convinced we should rely on `__SIZEOF_SIZE_T__` being available at least we should test here it's defined. (Alternatively we do a runtime test, for an example see `has-unix-headers`.)
> I would try using a runtime test that checks the result of `sizeof(void*) == 4`.
>I'm not convinced we should rely on __SIZEOF_SIZE_T__ being available at least we should test here it's defined. (Alternatively we do a runtime test, for an example see has-unix-headers.)
I guess a simple fallback to `0` will work, rebased.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151046/new/
https://reviews.llvm.org/D151046
More information about the libcxx-commits
mailing list