[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #59270] [PATCH] node.h: avoid C++11 feature (non-const init in clas
From: |
Ingo Schwarze |
Subject: |
[bug #59270] [PATCH] node.h: avoid C++11 feature (non-const init in class) |
Date: |
Wed, 14 Oct 2020 09:34:46 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; OpenBSD amd64; rv:81.0) Gecko/20100101 Firefox/81.0 |
URL:
<https://savannah.gnu.org/bugs/?59270>
Summary: [PATCH] node.h: avoid C++11 feature (non-const init
in class)
Project: GNU troff
Submitted by: schwarze
Submitted on: Wed 14 Oct 2020 01:34:45 PM UTC
Category: Core
Severity: 3 - Normal
Item Group: Build/Installation
Status: None
Privacy: Public
Assigned to: schwarze
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Compilation fails with GCC 4.2.1, which is the latest GNU compiler available
under GPLv2:
In file included from ../src/roff/troff/div.cpp:29:
../src/roff/troff/node.h:629: error: ISO C++ forbids initialization of member
'is_dying'
../src/roff/troff/node.h:629: error: making 'is_dying' static
../src/roff/troff/node.h:629: error: ISO C++ forbids in-class initialization
of non-const static member 'is_dying'
*** Error 1 in . (Makefile:6860 'src/roff/troff/div.o': @echo " CXX "
src/roff/troff/div.o;depbase=`echo src/roff/troff/div.o | sed 's|...)
*** Error 2 in /co/groff/build (Makefile:5317 'all')
While requiring C++11 is likely to make sense for many newer projects, i don't
think there is any benefit in groff requiring it, at least not as long as it
is trivial to avoid.
Compatibility with C++03 was broken in this commit:
commit c788cf8c6bbe939fa11f7ec032e525a7e33f41b6
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Sep 29 07:02:25 2020 +1000
The attached patch fixes the build with gcc 4.2.1.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 14 Oct 2020 01:34:45 PM UTC Name: node.c11.patch Size: 878B By:
schwarze
<http://savannah.gnu.org/bugs/download.php?file_id=49979>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59270>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #59270] [PATCH] node.h: avoid C++11 feature (non-const init in class),
Ingo Schwarze <=