summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/gcctoolchain.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-14 14:50:14 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-14 14:04:28 +0000
commit24eea824773da5b5b7239680401f5a9f7687e29c (patch)
tree3bc4f1fc04071822e4d52cac87e74e4fa71b5c61 /src/plugins/projectexplorer/gcctoolchain.cpp
parentfc23148202374e5e29d51d4de5f2a987a938e948 (diff)
downloadqt-creator-24eea824773da5b5b7239680401f5a9f7687e29c.tar.gz
Toolchains: Add C++98 as a language standard.
This was curiously missing from the CompilerFlag enum, so e.g. setting "QMAKE_CXXFLAGS += -std=c++98" in a .pro file did not have the desired effect on higher-level code such as the code model. Change-Id: Ia4323b699a2ccea9d3cbde10b05affe87d955277 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r--src/plugins/projectexplorer/gcctoolchain.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp
index 320bf86976..1ad40a8702 100644
--- a/src/plugins/projectexplorer/gcctoolchain.cpp
+++ b/src/plugins/projectexplorer/gcctoolchain.cpp
@@ -448,6 +448,7 @@ ToolChain::CompilerFlags GccToolChain::compilerFlags(const QStringList &cxxflags
const QByteArray std = flag.mid(5).toLatin1();
if (std == "c++98" || std == "c++03") {
flags &= ~CompilerFlags(StandardCxx11 | StandardCxx14 | StandardCxx17 | GnuExtensions);
+ flags |= StandardCxx98;
} else if (std == "gnu++98" || std == "gnu++03") {
flags &= ~CompilerFlags(StandardCxx11 | StandardCxx14 | StandardCxx17);
flags |= GnuExtensions;