input/Error: work around clang bug leading to crash

Closes #373
This commit is contained in:
Max Kellermann 2018-10-23 19:51:29 +02:00
parent f7d1408a1a
commit 751fff07fb
2 changed files with 9 additions and 0 deletions

1
NEWS
View File

@ -12,6 +12,7 @@ ver 0.20.22 (not yet released)
- now runs as a service
- add button to start/stop MPD
- add option to auto-start on boot
* work around clang bug leading to crash
* install the SVG icon
ver 0.20.21 (2018/08/17)

View File

@ -30,7 +30,15 @@
* exist? This function attempts to recognize exceptions thrown by
* various input plugins.
*/
#ifndef __clang__
/* the "pure" attribute must be disabled because it triggers a clang
bug, wrongfully leading to std::terminate() even though the
function catches all exceptions thrown by std::rethrow_exception();
this can be reproduced with clang 7 from Android NDK r18b and on
clang 6 on FreeBSD
(https://github.com/MusicPlayerDaemon/MPD/issues/373) */
gcc_pure
#endif
bool
IsFileNotFound(std::exception_ptr e);