[2/2] gdb: Require C++11

Message ID 86twbo7eu6.fsf@gmail.com
State New, archived
Headers

Commit Message

Yao Qi Nov. 3, 2016, 3:39 p.m. UTC
  Pedro Alves <palves@redhat.com> writes:

Hi Pedro,

> to.  The result would be that a make invocation from the build/gdb/
> directory would use "g++ -std=gnu++11" as expected, while a make
> invocation at the top level would not.

This happens to break the build if bison is not new enough (bison 2.6.4),
See details in the patch below,
  

Comments

Pedro Alves Nov. 3, 2016, 3:58 p.m. UTC | #1
Hi Yao,

> gdb:
> 
> 2016-11-03  Yao Qi  <yao.qi@linaro.org>
> 
> 	* Makefile.in (.y.c): Replace YY_NULL with YY_NULLPTR.

LGTM.  Thanks for fixing this.

Thanks,
Pedro Alves
  
Yao Qi Nov. 3, 2016, 4:10 p.m. UTC | #2
On Thu, Nov 3, 2016 at 3:58 PM, Pedro Alves <palves@redhat.com> wrote:
> Hi Yao,
>
>> gdb:
>>
>> 2016-11-03  Yao Qi  <yao.qi@linaro.org>
>>
>>       * Makefile.in (.y.c): Replace YY_NULL with YY_NULLPTR.
>
> LGTM.  Thanks for fixing this.
>

Patch is pushed in.
  

Patch

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d035d8e..6db63c7 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1894,6 +1894,7 @@  po/$(PACKAGE).pot: force
 	     -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \
 	     -e 's/\([ \t;,(]\)free$$/\1xfree/g' \
 	     -e '/^#line.*y.tab.c/d' \
+	     -e 's/YY_NULL/YY_NULLPTR/g' \
 	  < $@.tmp > $@
 	rm -f $@.tmp
 .l.c: