*: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a recent clang version implements an optimization which pushes the definition's boundary beyond what I believed it was. clang now assumes that functions declared "pure" cannot throw exceptions, even if they lack the "noexcept" specification. When compiled with this new clang version, MPD will crash randomly if an exception happens to get thrown by such as "pure" function (https://github.com/MusicPlayerDaemon/MPD/issues/41). This commit removes all such misplaced "pure" and "const" attributes, closing #41.
This commit is contained in:
@@ -71,7 +71,6 @@ private:
|
||||
AllocatedPath MapFSOrThrow(const char *uri_utf8) const;
|
||||
};
|
||||
|
||||
gcc_pure
|
||||
static StorageFileInfo
|
||||
Stat(Path path, bool follow)
|
||||
{
|
||||
|
Reference in New Issue
Block a user