From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2279 invoked by alias); 7 Nov 2014 19:02:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2264 invoked by uid 48); 7 Nov 2014 19:01:59 -0000 From: "chengniansun at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63710] Incorrect column number for -Wconversion Date: Fri, 07 Nov 2014 19:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chengniansun at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00480.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63710 --- Comment #1 from Chengnian Sun --- I find the following test case, which seems related to this bug. The locati= ons of both warnings point to the condition instead of the expressions which require conversion.=20 $: cat t.c unsigned f(long l, char c) { return l ? l : c; } $:=20 $: gcc-trunk -Wconversion t.c -c t.c: In function =E2=80=98f=E2=80=99: t.c:2:10: warning: conversion to =E2=80=98unsigned int=E2=80=99 from =E2=80= =98char=E2=80=99 may change the sign of the result [-Wsign-conversion] return l ? l : c; ^ t.c:2:10: warning: conversion to =E2=80=98unsigned int=E2=80=99 from =E2=80= =98long int=E2=80=99 may alter its value [-Wconversion] $:=20 $:=20 $: clang-trunk -Wconversion t.c -c t.c:2:18: warning: operand of ? changes signedness: 'char' to 'unsigned int' [-Wsign-conversion] return l ? l : c; ~~~~~~ ^ t.c:2:14: warning: implicit conversion loses integer precision: 'long' to 'unsigned int' [-Wshorten-64-to-32] return l ? l : c; ~~~~~~ ^ 2 warnings generated. >>From gcc-bugs-return-466009-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 07 20:05:10 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29891 invoked by alias); 7 Nov 2014 20:05:10 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 29857 invoked by uid 48); 7 Nov 2014 20:05:06 -0000 From: "howarth at bromo dot med.uc.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/63777] New: bootstrap failure under x86_64 Fedora 15 in the linkage of libstdc++.so.6.0.21 Date: Fri, 07 Nov 2014 20:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: howarth at bromo dot med.uc.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg00481.txt.bz2 Content-length: 5283 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63777 Bug ID: 63777 Summary: bootstrap failure under x86_64 Fedora 15 in the linkage of libstdc++.so.6.0.21 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: howarth at bromo dot med.uc.edu The bootstrap of gcc trunk at r217234 on x86_64 Fedora 15 against binutils-2.21.51.0.6-6.fc15, configured with "../gcc-trunk/configure --disable-lto --enable-languages=c,c++,fortran", fails at the linkage of libstdc++.so.6.0.21 with the ld error... Making all in c++11 make[6]: Entering directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/c++11' make[6]: Nothing to be done for `all'. make[6]: Leaving directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/c++11' make[6]: Entering directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src' /bin/sh ../libtool --tag CXX --mode=link /home/howarth/build/./gcc/xgcc -shared-libgcc -B/home/howarth/build/./gcc -nostdinc++ -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/home/howarth/dist/x86_64-unknown-linux-gnu/bin/ -B/home/howarth/dist/x86_64-unknown-linux-gnu/lib/ -isystem /home/howarth/dist/x86_64-unknown-linux-gnu/include -isystem /home/howarth/dist/x86_64-unknown-linux-gnu/sys-include -Wl,-O1 -Wl,-z,relro -Wl,--gc-sections -fPIC -DPIC -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=libstdc++.la -o libstdc++.la -version-info 6:21:0 -Wl,--version-script=libstdc++-symbols.ver -lm -rpath /home/howarth/dist/lib/../lib64 compatibility.lo compatibility-debug_list.lo compatibility-debug_list-2.lo compatibility-c++0x.lo compatibility-atomic-c++0x.lo compatibility-thread-c++0x.lo compatibility-chrono.lo compatibility-condvar.lo ../libsupc++/libsupc++convenience.la ../src/c++98/libc++98convenience.la ../src/c++11/libc++11convenience.la libtool: link: /home/howarth/build/./gcc/xgcc -shared-libgcc -B/home/howarth/build/./gcc -nostdinc++ -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/home/howarth/dist/x86_64-unknown-linux-gnu/bin/ -B/home/howarth/dist/x86_64-unknown-linux-gnu/lib/ -isystem /home/howarth/dist/x86_64-unknown-linux-gnu/include -isystem /home/howarth/dist/x86_64-unknown-linux-gnu/sys-include -shared -nostdlib /usr/lib/../lib64/crti.o /home/howarth/build/./gcc/crtbeginS.o .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a -Wl,--no-whole-archive -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -lm -L/home/howarth/build/./gcc -L/lib/../lib64 -L/usr/lib/../lib64 -lc -lgcc_s /home/howarth/build/./gcc/crtendS.o /usr/lib/../lib64/crtn.o -Wl,-O1 -Wl,-z -Wl,relro -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.21 `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_throw.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_throw.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) collect2: error: ld returned 1 exit status make[6]: *** [libstdc++.la] Error 1 make[6]: Leaving directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src' make[5]: *** [all-recursive] Error 1 make[5]: Leaving directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3/src' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/howarth/build/x86_64-unknown-linux-gnu/libstdc++-v3' make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 make[2]: Leaving directory `/home/howarth/build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/howarth/build' make: *** [bootstrap] Error 2