Skip to content

Commit

Permalink
fix compilation with gcc 14 (DynamoRIO#6895)
Browse files Browse the repository at this point in the history
With gcc 14, building fails with the following error:
> error: template-id not allowed for destructor in C++20 [-Werror=
> template-id-cdtor]
  • Loading branch information
MikeWalrus authored Jul 23, 2024
1 parent fe2e442 commit b42d43b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions clients/drcachesim/reader/compressed_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ file_reader_t<gzip_reader_t>::file_reader_t()
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
file_reader_t<gzip_reader_t>::~file_reader_t<gzip_reader_t>()
file_reader_t<gzip_reader_t>::~file_reader_t()
{
if (input_file_.file != nullptr) {
gzclose(input_file_.file);
Expand Down Expand Up @@ -134,7 +134,7 @@ file_reader_t<gzip_reader_t>::read_next_entry()
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
record_file_reader_t<gzip_reader_t>::~record_file_reader_t<gzip_reader_t>()
record_file_reader_t<gzip_reader_t>::~record_file_reader_t()
{
if (input_file_ != nullptr) {
gzclose(input_file_->file);
Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/reader/lz4_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ file_reader_t<lz4_reader_t>::file_reader_t()
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
file_reader_t<lz4_reader_t>::~file_reader_t<lz4_reader_t>()
file_reader_t<lz4_reader_t>::~file_reader_t()
{
if (input_file_.file != nullptr) {
delete input_file_.file;
Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/reader/record_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace drmemtrace {
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
record_file_reader_t<std::ifstream>::~record_file_reader_t<std::ifstream>()
record_file_reader_t<std::ifstream>::~record_file_reader_t()
{
}

Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/reader/snappy_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ snappy_reader_t::read(size_t size, DR_PARAM_OUT void *to)
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
file_reader_t<snappy_reader_t>::~file_reader_t<snappy_reader_t>()
file_reader_t<snappy_reader_t>::~file_reader_t()
{
// Empty.
}
Expand Down
5 changes: 2 additions & 3 deletions clients/drcachesim/reader/zipfile_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ file_reader_t<zipfile_reader_t>::file_reader_t()
/* clang-format off */ /* (make vera++ newline-after-type check happy) */
template <>
/* clang-format on */
file_reader_t<zipfile_reader_t>::~file_reader_t<zipfile_reader_t>()
file_reader_t<zipfile_reader_t>::~file_reader_t()
{
if (input_file_.file != nullptr) {
unzClose(input_file_.file);
Expand Down Expand Up @@ -257,8 +257,7 @@ record_file_reader_t<zipfile_reader_t>::record_file_reader_t()
input_file_->file = nullptr;
}

template <>
record_file_reader_t<zipfile_reader_t>::~record_file_reader_t<zipfile_reader_t>()
template <> record_file_reader_t<zipfile_reader_t>::~record_file_reader_t()
{
if (input_file_->file != nullptr) {
unzClose(input_file_->file);
Expand Down

0 comments on commit b42d43b

Please sign in to comment.