Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scons error: class with destructor marked 'final' cannot be inherited from #90325

Closed
fire opened this issue Apr 6, 2024 · 1 comment · Fixed by #90326
Closed

Scons error: class with destructor marked 'final' cannot be inherited from #90325

fire opened this issue Apr 6, 2024 · 1 comment · Fixed by #90326

Comments

@fire
Copy link
Member

fire commented Apr 6, 2024

Tested versions

System information

Windows 11, Nvidia 3090, Vulkan forward+

Issue description

=====
In file included from platform\windows\rendering_context_driver_vulkan_windows.cpp:35:
platform\windows/rendering_context_driver_vulkan_windows.h:55:50: error: class with destructor marked 'final' cannot be inherited from [-Werror,-Wfinal-dtor-non-final-class]
   41 | class RenderingContextDriverVulkanWindows : public RenderingContextDriverVulkan {
      |                                           final
   42 | private:
   43 |         const char *_get_platform_surface_extension() const override final;
   44 |
   45 | protected:
   46 |         SurfaceID surface_create(const void *p_platform_data) override final;
   47 |
   48 | public:
   49 |         struct WindowPlatformData {
   50 |                 HWND window;
   51 |                 HINSTANCE instance;
   52 |         };
   53 |
   54 |         RenderingContextDriverVulkanWindows();
   55 |         ~RenderingContextDriverVulkanWindows() override final;
      |                                                         ^
platform\windows/rendering_context_driver_vulkan_windows.h:41:7: note: mark 'RenderingContextDriverVulkanWindows' as 'final' to silence this warning
   41 | class RenderingContextDriverVulkanWindows : public RenderingContextDriverVulkan {
      |       ^
1 error generated.

=====
scons: *** [platform\windows\rendering_context_driver_vulkan_windows.windows.editor.double.x86_64.llvm.o] Error 1
=====
In file included from platform\windows\display_server_windows.cpp:43:
platform\windows/rendering_context_driver_vulkan_windows.h:55:50: error: class with destructor marked 'final' cannot be inherited from [-Werror,-Wfinal-dtor-non-final-class]
   41 | class RenderingContextDriverVulkanWindows : public RenderingContextDriverVulkan {
      |                                           final
   42 | private:
   43 |         const char *_get_platform_surface_extension() const override final;
   44 |
   45 | protected:
   46 |         SurfaceID surface_create(const void *p_platform_data) override final;
   47 |
   48 | public:
   49 |         struct WindowPlatformData {
   50 |                 HWND window;
   51 |                 HINSTANCE instance;
   52 |         };
   53 |
   54 |         RenderingContextDriverVulkanWindows();
   55 |         ~RenderingContextDriverVulkanWindows() override final;
      |                                                         ^
platform\windows/rendering_context_driver_vulkan_windows.h:41:7: note: mark 'RenderingContextDriverVulkanWindows' as 'final' to silence this warning
   41 | class RenderingContextDriverVulkanWindows : public RenderingContextDriverVulkan {
      |       ^
1 error generated.

=====

Steps to reproduce

  1. scons werror=yes use_llvm=yes use_mingw=yes precision=double compiledb=yes target=editor tests=yes debug_symbols=yes
  2. fails

Minimal reproduction project (MRP)

None

@fire
Copy link
Member Author

fire commented Apr 6, 2024

diff --git a/VSK_godot/platform/windows/rendering_context_driver_vulkan_windows.h b/VSK_godot/platform/windows/rendering_context_driver_vulkan_windows.h
index 34546c9ea..1bb70cb0f 100644
--- a/VSK_godot/platform/windows/rendering_context_driver_vulkan_windows.h
+++ b/VSK_godot/platform/windows/rendering_context_driver_vulkan_windows.h
@@ -52,7 +52,7 @@ public:
        };
 
        RenderingContextDriverVulkanWindows();
-       ~RenderingContextDriverVulkanWindows() override final;
+       ~RenderingContextDriverVulkanWindows() override;
 };
 
 #endif // VULKAN_ENABLED

This seems to fix it, but I'll file this bug first.

@fire fire changed the title error: class with destructor marked 'final' cannot be inherited from Scons error: class with destructor marked 'final' cannot be inherited from Apr 6, 2024
@akien-mga akien-mga added this to the 4.3 milestone Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants