This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17307] Spurious -Wsign-conversion warning with clang-3.5, due to excessively clever glibc <sys/resource.h>
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 25 Aug 2014 18:54:12 +0000
- Subject: [Bug libc/17307] Spurious -Wsign-conversion warning with clang-3.5, due to excessively clever glibc <sys/resource.h>
- Auto-submitted: auto-generated
- References: <bug-17307-131 at http dot sourceware dot org/bugzilla/>
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.