On 04/28/2017 08:01 PM, Pedro Alves wrote: > On 04/28/2017 05:28 PM, Martin Sebor wrote: >> On 04/28/2017 05:47 AM, Nathan Sidwell wrote: > >>>> @@ -427,9 +429,31 @@ static void output_lines (FILE *, const source_t >>>> *); >>>> static char *make_gcov_file_name (const char *, const char *); >>>> static char *mangle_name (const char *, char *); >>>> static void release_structures (void); >>>> -static void release_function (function_t *); >>>> extern int main (int, char **); >>>> +function_info::function_info () >>>> +{ >>>> + memset (this, 0, sizeof (*this)); >>> >>> EW. ok with a comment about function_info's c++11's PoDness. >> >> Unless it's some other kind of vector, the patch adds a vector >> member to the class, which makes it not a PoD.(*) > > Funny, just this week we added this to gdb to catch such misuses > at compile time: > https://sourceware.org/ml/gdb-patches/2017-04/msg00378.html > https://sourceware.org/ml/gdb-patches/2017-04/msg00381.html
I think that teaching g++ new warnings for these issues would be neat, BTW. Thanks, Pedro Alves