diff --git a/compiler/extensions/cpp/src/zserio/extension/cpp/CppExtension.java b/compiler/extensions/cpp/src/zserio/extension/cpp/CppExtension.java index e8bdb612d..c47526c59 100644 --- a/compiler/extensions/cpp/src/zserio/extension/cpp/CppExtension.java +++ b/compiler/extensions/cpp/src/zserio/extension/cpp/CppExtension.java @@ -54,8 +54,6 @@ public boolean isEnabled(ExtensionParameters parameters) @Override public void check(Root rootNode, ExtensionParameters parameters) throws ZserioExtensionException { - CppExtensionParameters.check(parameters); - final CompatibilityChecker compatibilityChecker = new CompatibilityChecker(); rootNode.walk(compatibilityChecker); @@ -70,6 +68,9 @@ public void check(Root rootNode, ExtensionParameters parameters) throws ZserioEx @Override public void process(Root rootNode, ExtensionParameters parameters) throws ZserioExtensionException { + // this check should be here not in check() method to avoid reporting error if extension is not called + CppExtensionParameters.check(parameters); + final OutputFileManager outputFileManager = new OutputFileManager(parameters); final CppExtensionParameters cppParameters = new CppExtensionParameters(parameters);