public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Avi Kivity <avi@scylladb.com>
To: git-commits@fedoraproject.org
Subject: [rpms/antlr3] epel10: Fix runtime support for C++20 mode (#1834782)
Date: Wed, 22 Jul 2026 19:37:41 GMT [thread overview]
Message-ID: <178474906136.1.17667378888737219179.rpms-antlr3-f1bb8d639678@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/antlr3
Branch : epel10
Commit : f1bb8d639678047935e1761c3bf3c1c7da8d0f1d
Author : Avi Kivity <avi@scylladb.com>
Date : 2020-05-12T15:16:23+03:00
Stats : +46/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/antlr3/c/f1bb8d639678047935e1761c3bf3c1c7da8d0f1d?branch=epel10
Log:
Fix runtime support for C++20 mode (#1834782)
---
diff --git a/0006-antlr3memory.hpp-fix-for-C-20-mode.patch b/0006-antlr3memory.hpp-fix-for-C-20-mode.patch
new file mode 100644
index 0000000..fd0870c
--- /dev/null
+++ b/0006-antlr3memory.hpp-fix-for-C-20-mode.patch
@@ -0,0 +1,39 @@
+From 478902a7e57e2283c57410f5aa14939e743b5102 Mon Sep 17 00:00:00 2001
+From: Avi Kivity <avi@scylladb.com>
+Date: Tue, 12 May 2020 14:51:18 +0300
+Subject: [PATCH] antlr3memory.hpp: fix for C++20 mode
+
+gcc 10 in C++20 mode requires that the allocator type match
+the type used to allocate, so do that by adding "const" to the
+key type.
+---
+ runtime/Cpp/include/antlr3memory.hpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/runtime/Cpp/include/antlr3memory.hpp b/runtime/Cpp/include/antlr3memory.hpp
+index 7713613..4667a00 100755
+--- a/runtime/Cpp/include/antlr3memory.hpp
++++ b/runtime/Cpp/include/antlr3memory.hpp
+@@ -98,17 +98,17 @@ public:
+ {
+ };
+
+ template<class KeyType, class ValueType>
+ class UnOrderedMapType : public std::map< KeyType, ValueType, std::less<KeyType>,
+- AllocatorType<std::pair<KeyType, ValueType> > >
++ AllocatorType<std::pair<const KeyType, ValueType> > >
+ {
+ };
+
+ template<class KeyType, class ValueType>
+ class OrderedMapType : public std::map< KeyType, ValueType, std::less<KeyType>,
+- AllocatorType<std::pair<KeyType, ValueType> > >
++ AllocatorType<std::pair<const KeyType, ValueType> > >
+ {
+ };
+
+ ANTLR_INLINE static void* operator new (std::size_t bytes)
+ {
+--
+2.26.2
+
diff --git a/antlr3.spec b/antlr3.spec
index 02ac73c..79b55bf 100644
--- a/antlr3.spec
+++ b/antlr3.spec
@@ -1,7 +1,7 @@
%global antlr_version 3.5.2
%global c_runtime_version 3.4
%global javascript_runtime_version 3.1
-%global baserelease 26
+%global baserelease 27
Summary: ANother Tool for Language Recognition
Name: antlr3
@@ -27,6 +27,8 @@ Patch3: 0003-fix-c-template.patch
Patch4: 0004-eof-token.patch
# Make parsers reproducible. Patch from Debian.
Patch5: 0005-reproducible-parsers.patch
+# Fix for C++20
+Patch6: 0006-antlr3memory.hpp-fix-for-C-20-mode.patch
BuildRequires: ant
BuildRequires: maven-local
@@ -143,6 +145,7 @@ sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
# remove pre-built artifacts
find -type f -a -name *.jar -delete
@@ -278,6 +281,9 @@ install -pm 644 runtime/Cpp/include/* $RPM_BUILD_ROOT/%{_includedir}/
%doc tool/LICENSE.txt
%changelog
+* Tue May 12 2020 Avi Kivity <avi@scylladb.com> - 1:3.5.2-27
+- Fix for C++20 mode (#1834782)
+
* Sat Apr 25 2020 Fabio Valentini <decathorpe@gmail.com> - 1:3.5.2-26
- Remove unnecessary dependency on deprecated parent pom.
reply other threads:[~2026-07-22 19:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178474906136.1.17667378888737219179.rpms-antlr3-f1bb8d639678@fedoraproject.org \
--to=avi@scylladb.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox