public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
       [not found] <E1d6JGc-0000zB-OE@kwanyin.sergiodj.net>
@ 2017-05-04 16:42 ` Pedro Alves
  2017-05-04 18:15   ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2017-05-04 16:42 UTC (permalink / raw)
  To: gdb-patches

On 05/04/2017 05:06 PM, gdb-buildbot@sergiodj.net wrote:
> g++  -g -O2   -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-gdb/gdb/../include/opcode -I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/.. -I../../binutils-gdb/gdb/../zlib -I../bfd -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber  -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1   -pthread -I/usr/include/guile/2.0 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wformat-nonliteral -Werror -c -o interps.o -MT interps.o -MMD -MP -MF .deps/interps.Tpo ../../binutils-gdb/gdb/interps.c
> In file included from ../../binutils-gdb/gdb/infrun.c:26:0:
> ../../binutils-gdb/gdb/inferior.h: In function void handle_vfork_child_exec_or_exit(int):
> ../../binutils-gdb/gdb/inferior.h:553:39: error: *((void*)(& maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    { set_current_inferior (m_saved_inf); }
>                                        ^
> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(& maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf was declared here
>       maybe_restore_inferior;
>       ^~~~~~~~~~~~~~~~~~~~~~
> In file included from ../../binutils-gdb/gdb/inferior.h:46:0,
>                  from ../../binutils-gdb/gdb/infrun.c:26:
> ../../binutils-gdb/gdb/progspace.h:274:47: error: *((void*)(& maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    { set_current_program_space (m_saved_pspace); }
>                                                ^
> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(& maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace was declared here
>       maybe_restore_inferior;
>       ^~~~~~~~~~~~~~~~~~~~~~

Fun, looks like gdb::optional related ...

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Oh dear. I regret to inform you that commit 'RAII-fy  make_cleanup_restore_current_thread & friends' might be unfortunate
  2017-05-04 16:42 ` Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate Pedro Alves
@ 2017-05-04 18:15   ` Simon Marchi
  2017-05-04 18:23     ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2017-05-04 18:15 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On 2017-05-04 12:42, Pedro Alves wrote:
> On 05/04/2017 05:06 PM, gdb-buildbot@sergiodj.net wrote:
>> g++  -g -O2   -I. -I../../binutils-gdb/gdb 
>> -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config 
>> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H 
>> -I../../binutils-gdb/gdb/../include/opcode 
>> -I../../binutils-gdb/gdb/../opcodes/.. 
>> -I../../binutils-gdb/gdb/../readline/.. 
>> -I../../binutils-gdb/gdb/../zlib -I../bfd 
>> -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include 
>> -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber  
>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1 
>>   -pthread -I/usr/include/guile/2.0 -I/usr/include/python2.7 
>> -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused 
>> -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts 
>> -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable 
>> -Wno-sign-compare -Wno-narrowing -Wformat-nonliteral -Werror -c -o 
>> interps.o -MT interps.o -MMD -MP -MF .deps/interps.Tpo 
>> ../../binutils-gdb/gdb/interps.c
>> In file included from ../../binutils-gdb/gdb/infrun.c:26:0:
>> ../../binutils-gdb/gdb/inferior.h: In function void 
>> handle_vfork_child_exec_or_exit(int):
>> ../../binutils-gdb/gdb/inferior.h:553:39: error: *((void*)(& 
>> maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf 
>> may be used uninitialized in this function 
>> [-Werror=maybe-uninitialized]
>>    { set_current_inferior (m_saved_inf); }
>>                                        ^
>> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(& 
>> maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf 
>> was declared here
>>       maybe_restore_inferior;
>>       ^~~~~~~~~~~~~~~~~~~~~~
>> In file included from ../../binutils-gdb/gdb/inferior.h:46:0,
>>                  from ../../binutils-gdb/gdb/infrun.c:26:
>> ../../binutils-gdb/gdb/progspace.h:274:47: error: *((void*)(& 
>> maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace 
>> may be used uninitialized in this function 
>> [-Werror=maybe-uninitialized]
>>    { set_current_program_space (m_saved_pspace); }
>>                                                ^
>> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(& 
>> maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace 
>> was declared here
>>       maybe_restore_inferior;
>>       ^~~~~~~~~~~~~~~~~~~~~~
> 
> Fun, looks like gdb::optional related ...
> 
> Thanks,
> Pedro Alves

What do you need to reproduce this?  GCC 7?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
  2017-05-04 18:15   ` Simon Marchi
@ 2017-05-04 18:23     ` Pedro Alves
  2017-05-04 18:29       ` Pedro Alves
  2017-05-05  0:10       ` [pushed] gdb: Disable -Werror for -Wmaybe-uninitialized (Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate) Pedro Alves
  0 siblings, 2 replies; 7+ messages in thread
From: Pedro Alves @ 2017-05-04 18:23 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 05/04/2017 07:15 PM, Simon Marchi wrote:
> On 2017-05-04 12:42, Pedro Alves wrote:
>> On 05/04/2017 05:06 PM, gdb-buildbot@sergiodj.net wrote:
>>> g++  -g -O2   -I. -I../../binutils-gdb/gdb
>>> -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config
>>> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
>>> -I../../binutils-gdb/gdb/../include/opcode
>>> -I../../binutils-gdb/gdb/../opcodes/..
>>> -I../../binutils-gdb/gdb/../readline/..
>>> -I../../binutils-gdb/gdb/../zlib -I../bfd
>>> -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include
>>> -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber 
>>> -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import  
>>> -DTUI=1   -pthread -I/usr/include/guile/2.0 -I/usr/include/python2.7
>>> -I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused
>>> -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
>>> -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable
>>> -Wno-sign-compare -Wno-narrowing -Wformat-nonliteral -Werror -c -o
>>> interps.o -MT interps.o -MMD -MP -MF .deps/interps.Tpo
>>> ../../binutils-gdb/gdb/interps.c
>>> In file included from ../../binutils-gdb/gdb/infrun.c:26:0:
>>> ../../binutils-gdb/gdb/inferior.h: In function void
>>> handle_vfork_child_exec_or_exit(int):
>>> ../../binutils-gdb/gdb/inferior.h:553:39: error: *((void*)(&
>>> maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf
>>> may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>>    { set_current_inferior (m_saved_inf); }
>>>                                        ^
>>> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(&
>>> maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf
>>> was declared here
>>>       maybe_restore_inferior;
>>>       ^~~~~~~~~~~~~~~~~~~~~~
>>> In file included from ../../binutils-gdb/gdb/inferior.h:46:0,
>>>                  from ../../binutils-gdb/gdb/infrun.c:26:
>>> ../../binutils-gdb/gdb/progspace.h:274:47: error: *((void*)(&
>>> maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace
>>> may be used uninitialized in this function [-Werror=maybe-uninitialized]
>>>    { set_current_program_space (m_saved_pspace); }
>>>                                                ^
>>> ../../binutils-gdb/gdb/infrun.c:940:6: note: *((void*)(&
>>> maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace
>>> was declared here
>>>       maybe_restore_inferior;
>>>       ^~~~~~~~~~~~~~~~~~~~~~
>>
>> Fun, looks like gdb::optional related ...
>>
>> Thanks,
>> Pedro Alves
> 
> What do you need to reproduce this?  GCC 7?

The above is g++ 6.3.1, if I can trust the buildslave description page.
I didn't try that release, but gcc master warns the same way.

And, if I hack the code to use std::optional instead of gdb::optional :

diff --git c/gdb/infrun.c w/gdb/infrun.c
index d0504de..11196ee 100644
--- c/gdb/infrun.c
+++ w/gdb/infrun.c
@@ -910,6 +910,8 @@ private:
   scoped_restore_current_inferior m_inferior;
 };
 
+#include <optional>
+
 /* Called whenever we notice an exec or exit event, to handle
    detaching or resuming a vfork parent.  */
 
@@ -936,9 +938,9 @@ handle_vfork_child_exec_or_exit (int exec)
 
          inf->vfork_parent->pending_detach = 0;
 
-         gdb::optional<scoped_restore_exited_inferior>
+         std::optional<scoped_restore_exited_inferior>
            maybe_restore_inferior;
-         gdb::optional<scoped_restore_current_pspace_and_thread>
+         std::optional<scoped_restore_current_pspace_and_thread>
            maybe_restore_thread;
 
          /* If we're handling a child exit, then inferior_ptid points


and compile with -std=gnu++17, I get the exact same warning again...

src/gdb/infrun.c
In file included from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/infrun.c:26:0:
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/inferior.h: In function ‘void handle_vfork_child_exec_or_exit(int)’:
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/inferior.h:553:26: error: ‘*((void*)(& maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   { set_current_inferior (m_saved_inf); }
     ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/infrun.c:942:6: note: ‘*((void*)(& maybe_restore_inferior)+40).scoped_restore_current_inferior::m_saved_inf’ was declared here
      maybe_restore_inferior;
      ^~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/inferior.h:46:0,
                 from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/infrun.c:26:
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/progspace.h:274:31: error: ‘*((void*)(& maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   { set_current_program_space (m_saved_pspace); }
     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/pedro/gdb/mygit/cxx-convertion/src/gdb/infrun.c:942:6: note: ‘*((void*)(& maybe_restore_inferior)+32).scoped_restore_current_program_space::m_saved_pspace’ was declared here
      maybe_restore_inferior;
      ^~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors


AFAICS so far, this is a false positive.

Not sure what to do.  I wouldn't want to force-memset
the optional's storage to work around it, which would be
a pessimization to quiet a warning.  From above, we see that
that wouldn't work when we later start using std::optional.

There's a bug open about this (for boost::optional, but most
probably the exact same):
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78044

Comment #2 makes me think that we should really disable
the warning, or at least make it "-Wno-error=maybe-uninitialized".
I've seen other similar comments around the interwebs when looking
for this warning + optional.

Maybe I could check if the gcc folks plan on doing something to
std::optional to work around this.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
  2017-05-04 18:23     ` Pedro Alves
@ 2017-05-04 18:29       ` Pedro Alves
  2017-05-04 21:49         ` Pedro Alves
  2017-05-05  0:10       ` [pushed] gdb: Disable -Werror for -Wmaybe-uninitialized (Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate) Pedro Alves
  1 sibling, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2017-05-04 18:29 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 05/04/2017 07:22 PM, Pedro Alves wrote:

> AFAICS so far, this is a false positive.
> 
> Not sure what to do.  I wouldn't want to force-memset
> the optional's storage to work around it, which would be
> a pessimization to quiet a warning.  From above, we see that
> that wouldn't work when we later start using std::optional.
> 
> There's a bug open about this (for boost::optional, but most
> probably the exact same):
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78044

I've tried the reproducer there with the obvious change to use
std::optional and that does not warn.  So this is a different,
though related issue.

Or maybe there's really something wrong with the gdb code
that is escaping me.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
  2017-05-04 18:29       ` Pedro Alves
@ 2017-05-04 21:49         ` Pedro Alves
  2017-05-04 22:36           ` Pedro Alves
  0 siblings, 1 reply; 7+ messages in thread
From: Pedro Alves @ 2017-05-04 21:49 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 05/04/2017 07:28 PM, Pedro Alves wrote:
> On 05/04/2017 07:22 PM, Pedro Alves wrote:
> 
>> AFAICS so far, this is a false positive.
>>
>> Not sure what to do.  I wouldn't want to force-memset
>> the optional's storage to work around it, which would be
>> a pessimization to quiet a warning.  From above, we see that
>> that wouldn't work when we later start using std::optional.
>>
>> There's a bug open about this (for boost::optional, but most
>> probably the exact same):
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78044
> 
> I've tried the reproducer there with the obvious change to use
> std::optional and that does not warn.  So this is a different,
> though related issue.
> 
> Or maybe there's really something wrong with the gdb code
> that is escaping me.

OK, here's smallest, self-contained reproducer I managed to
come up with:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//#include <optional>
#include <new>

template<typename T>
struct optional
{
  optional () : m_dummy () {}
  ~optional () { m_item.~T (); }
  void emplace () { new (&m_item) T (); }

  union
  {
    int m_dummy;
    T m_item;
  };
};

template <typename T>
using Optional = optional<T>; // warns
//using Optional = std::optional<T>; // warns too

extern int get ();
extern void set (int);

struct A
{
  A () : m (get ()) {}
  ~A () { set (m); }

  int m;
};

struct B
{
  B ();
  ~B ();
};

void func ()
{
  Optional<A> maybe_a;
  Optional<B> maybe_b;

  maybe_a.emplace ();
  maybe_b.emplace ();
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


$ /opt/gcc/bin/g++ optional.cc -g3 -O2 -Wmaybe-uninitialized -std=gnu++17 -c
optional.cc: In function ‘void func()’:
optional.cc:28:15: warning:
‘maybe_a.optional<A>::<anonymous>.optional<A>::<unnamed union>::m_dummy’
may be used uninitialized in this function [-Wmaybe-uninitialized]
   ~A () { set (m); }
           ~~~~^~~
optional.cc:41:15: note:
‘maybe_a.optional<A>::<anonymous>.optional<A>::<unnamed union>::m_dummy’
was declared here
   Optional<A> maybe_a;
               ^~~~~~~

Looks like a compiler bug to me.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
  2017-05-04 21:49         ` Pedro Alves
@ 2017-05-04 22:36           ` Pedro Alves
  0 siblings, 0 replies; 7+ messages in thread
From: Pedro Alves @ 2017-05-04 22:36 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 05/04/2017 10:49 PM, Pedro Alves wrote:

> $ /opt/gcc/bin/g++ optional.cc -g3 -O2 -Wmaybe-uninitialized -std=gnu++17 -c
> optional.cc: In function ‘void func()’:
> optional.cc:28:15: warning:
> ‘maybe_a.optional<A>::<anonymous>.optional<A>::<unnamed union>::m_dummy’
> may be used uninitialized in this function [-Wmaybe-uninitialized]
>    ~A () { set (m); }
>            ~~~~^~~
> optional.cc:41:15: note:
> ‘maybe_a.optional<A>::<anonymous>.optional<A>::<unnamed union>::m_dummy’
> was declared here
>    Optional<A> maybe_a;
>                ^~~~~~~
> 
> Looks like a compiler bug to me.
> 

Now reported:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [pushed] gdb: Disable -Werror for -Wmaybe-uninitialized (Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate)
  2017-05-04 18:23     ` Pedro Alves
  2017-05-04 18:29       ` Pedro Alves
@ 2017-05-05  0:10       ` Pedro Alves
  1 sibling, 0 replies; 7+ messages in thread
From: Pedro Alves @ 2017-05-05  0:10 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 05/04/2017 07:22 PM, Pedro Alves wrote:
> Comment #2 makes me think that we should really disable
> the warning, or at least make it "-Wno-error=maybe-uninitialized".
> I've seen other similar comments around the interwebs when looking
> for this warning + optional.

OK, I think I've done all I reasonably could tonight, and I'm about
to turn into a pumpkin.  In the interest of unbreaking the build and
buildbots, I went ahead and pushed the patch below.

From e13cb306f099a8cd450c9fba0dfa22521aaa3c95 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 5 May 2017 01:03:28 +0100
Subject: [PATCH] gdb: Disable -Werror for -Wmaybe-uninitialized

Newer GCCs are triggering false-positive -Wmaybe-uninitialized
warnings around code that uses gdb::optional:
  https://sourceware.org/ml/gdb-patches/2017-05/msg00118.html

Using std::optional wouldn't help, it triggers the same warnings:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635

Initializing the variables to quiet the warning would defeat the
purpose of gdb::optional.  Making the optional ctor memset its storage
would be a pessimization.  Wrapping gdb::optional's internals with
"#pragma GCC diagnostic push/ignored/pop" doesn't work, we'd have to
wrap uses of gdb::optional instead, which I think would get unwieldy
and ugly as we start using gdb::optional more and more.

The -Wmaybe-uninitialized warning is documented as producing false
positives (unlike -Wuninialized), so until we find a better
workaround, disable -Werror for this warning.  You'll still see the
warning when building gdb, but it won't cause a build failure.

Tested by building with gcc 4.8.5, 5.3.1, and gcc trunk (20170428).

gdb/ChangeLog:
2017-05-05  Pedro Alves  <palves@redhat.com>

	* warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
	* configure: Regenerate.

gdb/gdbserver/ChangeLog:
2017-05-05  Pedro Alves  <palves@redhat.com>

	* configure: Regenerate.
---
 gdb/ChangeLog           | 5 +++++
 gdb/gdbserver/ChangeLog | 4 ++++
 gdb/configure           | 2 +-
 gdb/gdbserver/configure | 2 +-
 gdb/warning.m4          | 2 +-
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6e3a51e..475091d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-05  Pedro Alves  <palves@redhat.com>
+
+	* warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
+	* configure: Regenerate.
+
 2017-05-04  Pedro Alves  <palves@redhat.com>
 
 	* Makefile.in (SFILES): Add progspace-and-thread.c.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 8f7848c..e09035c 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2017-05-05  Pedro Alves  <palves@redhat.com>
+
+	* configure: Regenerate.
+
 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	* configure: Regenerate.
diff --git a/gdb/configure b/gdb/configure
index 25895b1..1554667 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15108,7 +15108,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing"
+-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index d524ae4..b314c41 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -7148,7 +7148,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing"
+-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 83f69ec..98e7453 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -40,7 +40,7 @@ build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts \
 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
--Wno-sign-compare -Wno-narrowing"
+-Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
-- 
2.5.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-05  0:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1d6JGc-0000zB-OE@kwanyin.sergiodj.net>
2017-05-04 16:42 ` Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate Pedro Alves
2017-05-04 18:15   ` Simon Marchi
2017-05-04 18:23     ` Pedro Alves
2017-05-04 18:29       ` Pedro Alves
2017-05-04 21:49         ` Pedro Alves
2017-05-04 22:36           ` Pedro Alves
2017-05-05  0:10       ` [pushed] gdb: Disable -Werror for -Wmaybe-uninitialized (Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate) Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).