Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation with GCC 14 #1076

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

yselkowitz
Copy link
Contributor

@yselkowitz yselkowitz commented Jun 23, 2024

Description

C++20 has changed the syntax for nested template constructors:

In file included from ../../src/vma/proto/mem_buf_desc.h:39,
                 from ../../src/vma/util/utils.h:47,
                 from vlogger.cpp:46:
../../src/vma/util/vma_list.h:210:31: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  210 |         vma_list_t<T, offset> (const vma_list_t<T, offset>& other) {
      |                               ^
../../src/vma/util/vma_list.h:210:31: note: remove the '< >'
What

Fixes compilation with GCC 14 and C++20.

Why ?

GCC 14 is the default compiler for RHEL 10 and Fedora 40, and newer.

Change type

What kind of change does this PR introduce?

  • Bugfix

Check list

  • Code follows the style de facto guidelines of this project
  • Comments have been inserted in hard to understand places
  • Documentation has been updated (if necessary)
  • Test has been added (if possible)

C++20 has changed the syntax for nested template constructors:

```
In file included from ../../src/vma/proto/mem_buf_desc.h:39,
                 from ../../src/vma/util/utils.h:47,
                 from vlogger.cpp:46:
../../src/vma/util/vma_list.h:210:31: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
  210 |         vma_list_t<T, offset> (const vma_list_t<T, offset>& other) {
      |                               ^
../../src/vma/util/vma_list.h:210:31: note: remove the '< >'
```

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
@swx-jenkins3
Copy link

Can one of the admins verify this patch?

@igor-ivanov
Copy link
Collaborator

@galnoam please handle

@igor-ivanov
Copy link
Collaborator

@galnoam @AlexanderGrissik please consider review fedora rawhide issue (https://src.fedoraproject.org/rpms/libvma/pull-request/3)

@galnoam
Copy link
Collaborator

galnoam commented Jul 9, 2024

@AlexanderGrissik, please review.

@AlexanderGrissik
Copy link
Collaborator

bot:retest

@AlexanderGrissik
Copy link
Collaborator

CI failed valgrind and is not related to the change. Known valgrind instability.
The change is C++ syntax and passes CI on all other supported platforms.

@AlexanderGrissik AlexanderGrissik merged commit 8d670d2 into Mellanox:master Jul 30, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants