This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

Re: missing g++ warning about bad allocation


Hello,

is it possible to add a waring about this into the upcomming release?

Best regards

Martin



I am using g++-4.4.0 on 32-Bit Ubuntu Linux. Also adding the suggested #include<new> does not make a difference. It seems to me, that this case is not yet handled by gcc when -Wconversion is activated.


<!--                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          -->

-------- Original-Nachricht --------
> Datum: Thu, 02 Jul 2009 16:07:11 -0700
> Von: Ian Lance Taylor <iant@google.com>
> An: "Martin Ettl" <ettl.martin@gmx.de>
> CC: gcc-help@gcc.gnu.org
> Betreff: Re: missing g++  warning about bad allocation

> "Martin Ettl" <ettl.martin@gmx.de> writes:
> 
> > Sorry for beeing so eager on this example, but i have compiled the
> testcase with following command:
> >
> > g++ -W -Wall -Wextra -Wconversion -pedantic -o test test.cpp
> > test.cpp: In function âint main()â:
> > test.cpp:3: warning: unused variable âdâ
> >
> > And g++ does not warn about this implicit conversion. Have i missed
> something?
> 
> -Wconversion has been significantly improved lately; which version of
> gcc are you using?
> 
> Also, does it make a difference if you #include <new>?
> 
> Ian

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser


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