From c3a71eb23b541f0502f3e2ccc6a07d0adbb882b4 Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Wed, 14 Aug 2019 17:13:03 +0300 Subject: [PATCH] =?UTF-8?q?=C2=B5Vision=20export:=20Handle=20more=20C++=20?= =?UTF-8?q?language=20standards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit µVision 5.28a now has options for gnu++14, c++14 and c++17, so we can use them rather than falling back to c++14 or gnu++11. This does mean that an export of current master, which uses gnu++14, will now require version 5.28a. I have not tested what happens if 5.27 is given a project file with these new option numbers. However, export of current master is broken for 5.27 anyway, as the fallback to gnu++11 means it fails to compile the C++14 constructs now in the codebase. Fixes #11217, as long as users update µVision too. --- tools/export/uvision/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/export/uvision/__init__.py b/tools/export/uvision/__init__.py index d6cb61d9ea..ce67e3aa1c 100644 --- a/tools/export/uvision/__init__.py +++ b/tools/export/uvision/__init__.py @@ -309,10 +309,10 @@ class Uvision(Exporter): std = None cpp_std = { 'c++98': 1, 'gnu++98': 2, - 'c++03': 5, 'gnu++03': 2, # UVision 5.27.1.0 does not support gnu++03 - fall back to gnu++98 + 'c++03': 5, 'gnu++03': 2, # UVision 5.28 does not support gnu++03 - fall back to gnu++98 'c++11': 3, 'gnu++11': 4, - 'c++14': 6, 'gnu++14': 4, # UVision 5.27.1.0 does not support gnu++14 - should be able to get it as compiler default, but that doesn't work as documented and requests gnu++98. So fall back to gnu++11 - 'c++17': 6, 'gnu++17': 4, # UVision 5.27.1.0 does not support c++17/gnu++17 - fall back to c++14/gnu++11 + 'c++14': 6, 'gnu++14': 7, # UVision 5.28 or later is required for gnu++14, c++14 or gnu++17 + 'c++17': 8, 'gnu++17': 9, } ctx['v6_lang_p'] = cpp_std.get(std, 0)