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

Changed the default to C++17 for QNX and g++ versions older as 11 (11… #2212

Merged
merged 4 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ACE/NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
USER VISIBLE CHANGES BETWEEN ACE-7.1.3 and ACE-7.1.4
====================================================

. With g++ versions < 11 we default to C++17 as
minimum C++ standards level

USER VISIBLE CHANGES BETWEEN ACE-7.1.2 and ACE-7.1.3
====================================================

Expand Down
14 changes: 14 additions & 0 deletions ACE/include/makeinclude/platform_g++_common.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ endif

CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)

# Minimum C++ level is now C++17, gcc until version 11 have an older version as default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't consistent with what the title of PR is. I'm also still not sure what the purpose of changing the default from the compiler default is. Does ACE still compile with C++14?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACE master currently compiles with C++14, this is a first step towards C++17 as minimum required level. Someone has to dive into the microsoft support, when we have there C++17 as default I plan to move C++17 as minimum level

ifeq ($(findstring $(CXX_MAJOR_VERSION),7),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),8),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),9),$(CXX_MAJOR_VERSION))
c++std ?= c++17
endif
ifeq ($(findstring $(CXX_MAJOR_VERSION),10),$(CXX_MAJOR_VERSION))
Comment on lines +78 to +87
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like this would match versions 17, 18, 19, 27, etc. If this was run with those versions it would downgrade the standard being used if the user didn't set c++std.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches the code we had in the past for C++11, will have a look at this before the next micro, feel free to open a PR

c++std ?= c++17
endif

# Only modify LDFLAGS if DLD has been set.
ifneq ($(DLD),)
ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc
Expand Down
2 changes: 1 addition & 1 deletion ACE/include/makeinclude/platform_qnx_gcc.GNU
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ debug ?= 1
optimize ?= 0
threads ?= 1
pipes ?= 0
c++std ?= gnu++14
c++std ?= gnu++17

CCFLAGS += -fexceptions
LDFLAGS += -fexceptions
Expand Down