Giter VIP home page Giter VIP logo

Comments (10)

SimonMaracine avatar SimonMaracine commented on September 23, 2024 1

Thank you! I'll check it out soon.
Suppressing the warning didn't appeal to me at first, especially doing it in the user code, but I think it's still alright.

from imguifiledialog.

SimonMaracine avatar SimonMaracine commented on September 23, 2024 1

I'm warnings free now. :)
Note that #pragma GCC diagnostic ignored "-Wunknown-pragmas" is still in the header file. Either there should be written a temporary comment about those lines, or they should be removed. I suggest the former. And this issue may be closed.

from imguifiledialog.

aiekick avatar aiekick commented on September 23, 2024

Hello,
np i take into account all user advices :)
will check that

from imguifiledialog.

aiekick avatar aiekick commented on September 23, 2024

its ok now for you ?

from imguifiledialog.

SimonMaracine avatar SimonMaracine commented on September 23, 2024

I tried the code with the latest changes and the warnings didn't go away.
First, I think that #pragma GCC diagnostic ignored "-Wpragmas" should have -Wunknown-pragmas instead, but I tried both anyway. The problem instead is that this specific warning might not be controllable by #pragma, i.e. it cannot be changed in any way. I even tried turning it into an error with #pragma GCC diagnostic error <kind> and it didn't work. See https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html.
It looks like the only option is to suppress this warning from the command line. (This works: -Wno-unknown-pragmas.)

from imguifiledialog.

SimonMaracine avatar SimonMaracine commented on September 23, 2024

One solution would be to add something like this in the CMakeLists.txt file of this project:

if(UNIX)
    target_compile_options(ImGuiFileDialog PUBLIC "-Wno-unknown-pragmas")
endif()

And probably instead of UNIX, it should check for a specific compiler:
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

from imguifiledialog.

aiekick avatar aiekick commented on September 23, 2024

ah yes its a solution. i tried "no-unknown-pragmas"' in code and was no effect. but not tested as flags to the compiler.
will test that. i think for unix is enough :)
thanks

from imguifiledialog.

SimonMaracine avatar SimonMaracine commented on September 23, 2024

Maybe it's for the same reason why #pragma GCC diagnostic ignored "-Wunknown-pragmas" or #pragma GCC diagnostic error "-Wunknown-pragmas" don't work either.

from imguifiledialog.

aiekick avatar aiekick commented on September 23, 2024

i see some issues and pullrequest on gcc and clang repo about these features, who are full of bug. so one day these pragma ignore in code will work. but for now this can work

from imguifiledialog.

aiekick avatar aiekick commented on September 23, 2024

thanks for your help :)

from imguifiledialog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.