diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 5838ed309f..782349b50d 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -62,6 +62,9 @@ Description // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register using namespace Foam; diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 7e0686d064..10738061c2 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -56,6 +56,9 @@ Description // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index d74f4ab01c..1f79995445 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -63,6 +63,9 @@ Description // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index c29bff53e5..0dbb0d5278 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -51,6 +51,9 @@ Description // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register using namespace Foam; diff --git a/src/fileFormats/stl/STLAsciiParseFlex.L b/src/fileFormats/stl/STLAsciiParseFlex.L index 0f66ea3eeb..2c93fdb7e9 100644 --- a/src/fileFormats/stl/STLAsciiParseFlex.L +++ b/src/fileFormats/stl/STLAsciiParseFlex.L @@ -44,6 +44,9 @@ Description // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register using namespace Foam; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index 4c01e3ea67..a77953325d 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -39,6 +39,9 @@ License // Flex may use register, which is deprecated and incompatible with C++17 #pragma clang diagnostic ignored "-Wdeprecated-register" +// A 'nothing' define to effectively remove from code as well (issue #3337) +#undef register +#define register // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //