This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41791] New: LTO warnings with -Winline
- From: "mckelvey at maskull dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2009 04:30:36 -0000
- Subject: [Bug c++/41791] New: LTO warnings with -Winline
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Simple program:
#include <string>
int
main(int,
char **)
{
std::string i;
i = "abc";
}
Compiled as:
/usr/local/bin/g++ -O3 -Winline -flto -Werror \
-o zzzzz.exe zzzzz.cc -lintl
Gives:
In file included from
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:296:0,
from :99:
zzzzz.cc: In function 'main':
/usr/local/lib/gcc/alphaev56-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:502:7:
warning: inlining failed in call to '__comp_dtor ': call is unlikely and code
size would grow
zzzzz.cc:9:17: warning: called from here
So, first, -Winline gives warnings in system code I have no control over,
Second, -Werror should have turned it into an error anyway.
Warning goes away if -flto is removed.
uname -a
Linux alpha1 2.4.9-40 #1 Mon Sep 23 08:14:02 EDT 2002 alpha unknown
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/alphaev56-unknown-linux-gnu/4.5.0/lto-wrapper
Target: alphaev56-unknown-linux-gnu
Configured with: ../gcc/configure --verbose --enable-languages=c++
--disable-linux-futex --disable-nls --disable-tls --enable-lto
Thread model: posix
gcc version 4.5.0 20091017 (experimental) (GCC)
BUILDING:
alias CONFIGURECVS='../gcc/configure --verbose --enable-languages=c++
--disable-linux-futex --disable-nls --disable-tls --enable-lto 2>&1 | tee clog'
alias BUILD='nice gmake CFLAGS='\'''\'' BOOT_CFLAGS='\'''\''
LIBCFLAGS='\''-g'\'' LIBCXXFLAGS='\''-g'\'' bootstrap 2>&1 | tee log'
--
Summary: LTO warnings with -Winline
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckelvey at maskull dot com
GCC build triplet: alphaev56-unknown-linux-gnu
GCC host triplet: alphaev56-unknown-linux-gnu
GCC target triplet: alphaev56-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41791