public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63710] Incorrect column number for -Wconversion
       [not found] <bug-63710-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-07 19:02 ` chengniansun at gmail dot com
  0 siblings, 0 replies; only message in thread
From: chengniansun at gmail dot com @ 2014-11-07 19:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63710

--- Comment #1 from Chengnian Sun <chengniansun at gmail dot com> ---
I find the following test case, which seems related to this bug. The locations
of both warnings point to the condition instead of the expressions which
require conversion. 


$: cat t.c
unsigned f(long l, char c) {
  return l ? l : c;
}
$: 
$: gcc-trunk -Wconversion t.c -c
t.c: In function ‘f’:
t.c:2:10: warning: conversion to ‘unsigned int’ from ‘char’ may change the sign
of the result [-Wsign-conversion]
   return l ? l : c;
          ^
t.c:2:10: warning: conversion to ‘unsigned int’ from ‘long int’ may alter its
value [-Wconversion]
$: 
$: 
$: 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: <gcc-bugs-return-466009-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
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: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
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" <gcc-bugzilla@gcc.gnu.org>
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: <bug-63777-4@http.gcc.gnu.org/bugzilla/>
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?idc777

            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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-07 19:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-63710-4@http.gcc.gnu.org/bugzilla/>
2014-11-07 19:02 ` [Bug c/63710] Incorrect column number for -Wconversion chengniansun at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).