RE: Question about static code analysis features in GCC

2011-04-12 Thread Hargett, Matt
Hey Sarah, Many array bounds and format string problems can already be found, especially with LTO, ClooG, loop-unrolling, and -O3 enabled. Seeing across object-file boundaries, understanding loop boundaries, and aggressive inlining allows GCC to warn about a lot of real-world vulnerabilities. W

RE: GCC 4.4/4.6/4.7 uninitialized warning regression?

2011-04-22 Thread Hargett, Matt
> > This brings out 2 questions. Why don't GCC 4.4/4.6/4.7 warn it? > > Why doesn't 64bit GCC 4.2 warn it? > Good question. It seems that the difference is whether the compiler > generates a field-by-field copy or a call to memcpy(). According to > David, the trunk gcc in 32-bit mode doesn't call

RE: GCC 4.6.1 Status Report (2011-06-20) [BRANCH FROZEN]

2011-06-20 Thread Hargett, Matt
> GCC 4.6.1 first release candidate has been uploaded, and the branch > is now frozen. All changes need RM approval now. > Please test it, if all goes well, 4.6.1 will be released early next > week. No chance for a fix for this in 4.6.1? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48600 This has

RE: C++ bootstrap of GCC - still useful ?

2011-07-09 Thread Hargett, Matt
> As of a couple of months, I perform a bootstrap-with-C++ > (--enable-build-with-cxx) daily on my machine between 18:10 and 20:10 UTC. > Is there still interest in daily builds like mine ? Absolutely! Especially if you do a profiled-bootstrap and/or LTO bootstrap in that mode. Hopefully this is

RE: Using C++ in GCC is OK

2010-06-01 Thread Hargett, Matt
> > My suggestions: > > > > * When it is appropriate to use a child class with virtual > functions, > >the virtual functions should all be declared as protected in the > >parent class. > > > > At first reading, I thought you meant "all virtual functions should > be > > protected", but I th

RE: Using C++ in GCC is OK

2010-06-01 Thread Hargett, Matt
A suggestion about: "Method bodies may only appear in the class definition if they are very short, no more than five lines. Otherwise the method body should be defined outside of the class definition." To avoid dependency explosions that increase compile times and allow for link-time substitut

RE: Using C++ in GCC is OK

2010-06-02 Thread Hargett, Matt
> >> I'm not sure i agree with this, because I don't see anything wrong > >> with multi-line C++-style comments. > > > > I'm with Ian on this one. Is there a reason for this, other than > one's > > personal tool preference for editing code may make C-style multi-line > > comments easier to add/remo

RE: Using C++ in GCC is OK

2010-06-03 Thread Hargett, Matt
> On Thu, Jun 3, 2010 at 6:09 AM, Richard Guenther > wrote: > > > Indeed ;)  I'd like us to switch to the C / C++ common soon (thus, > > use C for stage1 and C++ for stage2 and stage3).  That will help > > us sort out problems on the various host/target combinations that > > will surely exist. >

RE: gengtype needs for C++?

2010-06-28 Thread Hargett, Matt
> > In Tom's interesting idea, we would write the mark function by hand > for > > each C++ type that we use GTY with. > > > > One way to make this approach work for plugins would be to write > > > > template > > void > > mark(T& t) > > { > > t->mark(); > > } > > > > Then every plugin which invent

RE: [C++0x] implementing forward declarations for enums

2010-09-20 Thread Hargett, Matt
I just wanted to say thanks for implementing this. Being able to forward declare enums will make dependency breaking in legacy code much easier in many real-world cases. Thanks again! -Original Message- From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On Behalf Of Rodrigo Ri

RE: [C++0x] implementing forward declarations for enums

2010-09-22 Thread Hargett, Matt
On 09/21/2010 07:05 PM, Rodrigo Rivas wrote: >>> I had to initialize the variable nested_being_defined to get it to compile >>> (possible uninitialized warning). I initialized it to false. >>> >> Ok, actually it is never used uninitialized, but let's get rid of the >> warning. >> > I sa

RE: GCC and out-of-range constant array indexes?

2010-10-08 Thread Hargett, Matt
> The impact is that I may think that after I build my project at > -O0 or -O1, with various warnings enabled, that there are > potential surprises that await, when I perform a production build > at -O2 and higher. -Warray-bounds warnings can also be triggered only when using the aggressive inlin

RE: call for libstdc++ profile mode diagnostic ideas

2010-12-28 Thread Hargett, Matt
> I'm planning to add a set of new performance diagnostics to the > libstdc++ profile mode > (http://gcc.gnu.org/onlinedocs/libstdc++/manual/profile_mode.html) and > am trying to come up with a list of what diagnostics are most > meaningful and most wanted. > > At this (brainstorming) point I'm lo

RE: call for libstdc++ profile mode diagnostic ideas

2011-01-05 Thread Hargett, Matt
> Your first example points to a weakness in the compiler optimization. > If base_string constructor is inlined, the compiler should be able to > figure out both 'name' and the heap memory it points to can not be > modified by the call to notify, and therefore hoist access name.c_str > () and name.