Re: missing g++ warning about bad allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> An: "Martin Ettl" <ettl.martin@xxxxxx>
> CC: gcc-help@xxxxxxxxxxx
> Betreff: Re: missing g++  warning about bad allocation

> "Martin Ettl" <ettl.martin@xxxxxx> 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

-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux