This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17307] Spurious -Wsign-conversion warning with clang-3.5, due to excessively clever glibc <sys/resource.h>


https://sourceware.org/bugzilla/show_bug.cgi?id=17307

--- Comment #2 from Zack Weinberg <zackw at panix dot com> ---
gcc-4.9's -Wsign-conversion does not complain.  I think this may actually be a
lacuna in gcc's implementation of those warnings, because *this* program...

#include <sys/resource.h>
#include <stdio.h>
#include <type_traits>

int main(void)
{
    printf("%d %d\n",
           std::is_signed<enum __rlimit_resource>::value,
           std::is_signed<
               std::underlying_type<
                   enum __rlimit_resource>::type>::value);
    return 0;
}

... prints "0 0" when compiled with either clang++3.5 or g++4.9.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]