Integrated: 8331352: error: template-id not allowed for constructor/destructor in C++20
Jan Kratochvil
jkratochvil at openjdk.org
Fri May 10 12:19:29 UTC 2024
On Tue, 30 Apr 2024 02:01:01 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:
> When compiling trunk (819f3d6fc70ff6fe54ac5f9033c17c3dd4326aa5 2024-04-29) by gcc-14.0.1-0.15.fc40.x86_64 there are many errors:
>
> In file included from src/hotspot/share/memory/allocation.hpp:30,
> from src/hotspot/share/ci/ciBaseObject.hpp:29,
> from src/hotspot/share/ci/ciMetadata.hpp:28,
> from src/hotspot/share/ci/ciType.hpp:28,
> from src/hotspot/share/ci/ciKlass.hpp:28,
> from src/hotspot/share/ci/ciArrayKlass.hpp:28,
> from src/hotspot/share/ci/ciArray.hpp:28,
> from src/hotspot/share/ci/compilerInterface.hpp:28,
> from src/hotspot/share/compiler/abstractCompiler.hpp:28,
> from src/hotspot/share/compiler/abstractCompiler.cpp:25:
> src/hotspot/share/utilities/linkedlist.hpp:85:15: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
> 85 | NONCOPYABLE(LinkedList<E>);
> | ^~~~~~~~~~~~~
> src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
> 87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
> | ^
> src/hotspot/share/utilities/linkedlist.hpp:85:15: note: remove the ‘< >’
> 85 | NONCOPYABLE(LinkedList<E>);
> | ^~~~~~~~~~~~~
> src/hotspot/share/utilities/globalDefinitions.hpp:87:26: note: in definition of macro ‘NONCOPYABLE’
> 87 | #define NONCOPYABLE(C) C(C const&) = delete; C& operator=(C const&) = delete /* next token must be ; */
> | ^
>
> In file included from src/hotspot/share/gc/z/zGranuleMap.inline.hpp:30,
> from src/hotspot/share/gc/z/zForwardingTable.inline.hpp:32,
> from src/hotspot/share/gc/z/zHeap.inline.hpp:30,
> from src/hotspot/share/gc/z/zGeneration.inline.hpp:30,
> from src/hotspot/share/gc/z/zBarrier.inline.hpp:30,
> from src/hotspot/share/gc/z/zBarrierSet.inline.hpp:31,
> from src/hotspot/share/gc/shared/barrierSetConfig.inline.hpp:44,
> from src/hotspot/share/oops/access.inline.hpp:31,
> from src/hotspot/share/memory/iterator.inline.hpp:32,
> from src/hotspot/share/oops/oop.inline.hpp:31,
> from src/hotspot/share/compiler/abstractDisassembler.cpp:32:
> src/hotspot/share/gc/z/zArray.inline.hpp:99:21: error: template-id not allowed f...
This pull request has now been integrated.
Changeset: 45792c58
Author: Jan Kratochvil <jkratochvil at openjdk.org>
Committer: Yuri Nesterenko <yan at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/45792c5829fb1d5ee016c4a1fd6badb5d2b4239c
Stats: 4 lines in 4 files changed: 0 ins; 0 del; 4 mod
8331352: error: template-id not allowed for constructor/destructor in C++20
Reviewed-by: kbarrett, stefank
-------------
PR: https://git.openjdk.org/jdk/pull/19009
More information about the hotspot-dev
mailing list