@@ -387,6 +387,13 @@ private int tryMain(size_t argc, const(char)** argv)
387
387
global.params.useExceptions = false ;
388
388
}
389
389
390
+ /* TEMPORARILY set this to true until the runtime library is updated,
391
+ * in order to not leave the system in an unbuildable state.
392
+ */
393
+ global.params.cpp98 = true ;
394
+
395
+ if (global.params.isWindows && ! global.params.mscoff)
396
+ global.params.cpp98 = true ; // DMC++ is a C++98 compiler
390
397
391
398
if (! global.params.obj || global.params.lib)
392
399
global.params.link = false ;
@@ -1235,6 +1242,9 @@ void addDefaultVersionIdentifiers(const ref Param params)
1235
1242
VersionCondition.addPredefinedGlobalIdent(" D_Version2" );
1236
1243
VersionCondition.addPredefinedGlobalIdent(" all" );
1237
1244
1245
+ if (params.cpp98)
1246
+ VersionCondition.addPredefinedGlobalIdent(" Cpp98" );
1247
+
1238
1248
if (params.cpu >= CPU .sse2)
1239
1249
{
1240
1250
VersionCondition.addPredefinedGlobalIdent(" D_SIMD" );
@@ -2053,9 +2063,14 @@ bool parseCommandLine(const ref Strings arguments, const size_t argc, ref Param
2053
2063
}
2054
2064
else if (Identifier.isValidIdentifier(p + 9 ))
2055
2065
{
2056
- if (! params.versionids)
2057
- params.versionids = new Array! (const (char )* );
2058
- params.versionids.push(p + 9 );
2066
+ if (strcmp(p + 9 , " Cpp98" ) == 0 ) // -version=Cpp98
2067
+ params.cpp98 = true ; // version will be set in addDefaultVersionIdentifiers()
2068
+ else
2069
+ {
2070
+ if (! params.versionids)
2071
+ params.versionids = new Array! (const (char )* );
2072
+ params.versionids.push(p + 9 );
2073
+ }
2059
2074
}
2060
2075
else
2061
2076
goto Lerror;
0 commit comments