From 677049d914083aa14677b1f3adcbe01b390b80e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 18 Feb 2014 01:09:22 +0100 Subject: [PATCH] GCC 4.5 compatibility: cannot silence warnings in functions. What kind of half-assed feature is that?! --- src/Magnum/Framebuffer.cpp | 4 ++-- src/Magnum/Test/DebugGLTest.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Framebuffer.cpp b/src/Magnum/Framebuffer.cpp index b8c6ad729..a77b57535 100644 --- a/src/Magnum/Framebuffer.cpp +++ b/src/Magnum/Framebuffer.cpp @@ -221,12 +221,12 @@ Framebuffer& Framebuffer::attachTextureLayer(Framebuffer::BufferAttachment attac #ifdef MAGNUM_BUILD_DEPRECATED Framebuffer& Framebuffer::attachTexture2D(BufferAttachment attachment, Texture2D& texture, Int mipLevel) { - #ifdef __GNUC__ + #if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif (this->*Context::current()->state().framebuffer->texture2DImplementation)(attachment, GLenum(texture.target()), texture.id(), mipLevel); - #ifdef __GNUC__ + #if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY) #pragma GCC diagnostic pop #endif return *this; diff --git a/src/Magnum/Test/DebugGLTest.cpp b/src/Magnum/Test/DebugGLTest.cpp index 38a5e95e9..0fe9f26e1 100644 --- a/src/Magnum/Test/DebugGLTest.cpp +++ b/src/Magnum/Test/DebugGLTest.cpp @@ -111,12 +111,12 @@ void DebugGLTest::insertMessageFallback() { #ifdef MAGNUM_BUILD_DEPRECATED void DebugGLTest::deprecated() { - #ifdef __GNUC__ + #if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif DebugMarker::mark("hello"); - #ifdef __GNUC__ + #if defined(__GNUC__) && !defined(CORRADE_GCC45_COMPATIBILITY) #pragma GCC diagnostic pop #endif