Giter Site home page Giter Site logo

Comments (6)

ephemeralriggs avatar ephemeralriggs commented on May 20, 2024

Wow, this is interesting! You mean like setting
#define gcc_pure
in Compiler.h?
Does this happen to solve the library update problem mentioned in https://forum.musicpd.org/viewtopic.php?f=7&t=4318#p6880 and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219048 ?
Will test this ...

from mpd.

ephemeralriggs avatar ephemeralriggs commented on May 20, 2024

Seems indeed to work!
Thanks for tracking down this one!

from mpd.

jonsiddle avatar jonsiddle commented on May 20, 2024

Yes, that's exactly what I did. I didn't bother with a patch since it was such a simple change and I figured someone who knew the code might want to do it properly and keep the optimisation where exceptions weren't used or make it based on compiler. I'd be happy to have a go at a better fix if that would be helpful.

from mpd.

MaxKellermann avatar MaxKellermann commented on May 20, 2024

Huh, interesting find. The GCC documentation of pure leaves this part undefined - it does not mention whether "pure" functions are allowed to throw exceptions (which I interpreted as just another kind of "return value"), while clang appears to assume that a pure function is also noexcept.

from mpd.

MaxKellermann avatar MaxKellermann commented on May 20, 2024

I quickly wrote a clang plugin which shows me code locations that need to be fixed: https://gist.github.com/MaxKellermann/758ed94d66cc744fe163bee0f854352d

from mpd.

jonsiddle avatar jonsiddle commented on May 20, 2024

Nice way to find them. I've applied the commit and can confirm it fixes the issue I was seeing.

from mpd.

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.