diff --git a/dmd2/mars.h b/dmd2/mars.h index 6c9274ba..82083292 100644 --- a/dmd2/mars.h +++ b/dmd2/mars.h @@ -207,7 +207,7 @@ struct Param ubyte warnings; // enable warnings ubyte Dversion; // D version number bool ignoreUnsupportedPragmas; // rather than error on them - char enforcePropertySyntax; + bool enforcePropertySyntax; char *argv0; // program name Strings *imppath; // array of char*'s of where to look for import modules diff --git a/gen/cl_options.cpp b/gen/cl_options.cpp index 1eceadae..a869620f 100644 --- a/gen/cl_options.cpp +++ b/gen/cl_options.cpp @@ -26,9 +26,10 @@ static cl::opt useDeprecated("d", cl::location(global.params.useDeprecated)); #if DMDV2 -cl::opt enforcePropertySyntax("property", +cl::opt enforcePropertySyntax("property", cl::desc("Enforce property syntax"), - cl::ZeroOrMore); + cl::ZeroOrMore, + cl::location(global.params.enforcePropertySyntax)); #endif static cl::opt useDv1( diff --git a/gen/cl_options.h b/gen/cl_options.h index fb6bfeb6..53392e36 100644 --- a/gen/cl_options.h +++ b/gen/cl_options.h @@ -20,7 +20,7 @@ namespace opts { extern cl::list runargs; extern cl::opt compileOnly; #if DMDV2 - extern cl::opt enforcePropertySyntax; + extern cl::opt enforcePropertySyntax; #endif extern cl::opt createStaticLib; extern cl::opt createSharedLib; diff --git a/gen/main.cpp b/gen/main.cpp index bacdbca3..3ff361e0 100644 --- a/gen/main.cpp +++ b/gen/main.cpp @@ -219,11 +219,6 @@ int main(int argc, char** argv) printf("config %s\n", path.c_str()); } - // enforcePropertySyntax handled separately because it is a char -#if DMDV2 - global.params.enforcePropertySyntax = enforcePropertySyntax ? 1 : 0; -#endif - // Negated options global.params.link = !compileOnly; global.params.obj = !dontWriteObj;