[cfe-dev] [libc++] numeric.limits.members/traps.pass.cpp and arm

Howard Hinnant hhinnant at apple.com
Thu Nov 21 10:34:57 PST 2013


On Nov 20, 2013, at 3:29 AM, Nico Weber <thakis at chromium.org> wrote:

> Hi Howard,
> 
> test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp checks that std::numeric_limits<char>::traps is true, but include/limits only sets it to true on intel as far as I can tell:
> 
> #if __i386__ || __x86_64__
>     static _LIBCPP_CONSTEXPR const bool traps = true;
> #else
>     static _LIBCPP_CONSTEXPR const bool traps = false;
> #endif
> 
> How is this test supposed to work on arm? Should the test check for __i386__ || __x86_64__ too?
> 
> Thanks,
> Nico

I don't believe this test would pass on arm as currently configured.  I do not know what std::numeric_limits<char>::traps should be on arm.  But it would be a good thing to find out, fix it if libc++ currently gets the wrong answer, and make test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp consistent with whatever was done in include/limits.

Howard




More information about the cfe-dev mailing list