From 0e5d0c15430cf82861a1ae213cbccff065f71107 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Jul 2014 12:14:40 +0200 Subject: [PATCH] Fix compilation error on some versions of GCC src/libexpr/primops.cc:42:8: error: looser throw specifier for 'virtual nix::InvalidPathError::~InvalidPathError()' src/libexpr/nixexpr.hh:12:1: error: overriding 'virtual nix::EvalError::~EvalError() noexcept (true)' http://hydra.nixos.org/build/12385750 --- src/libexpr/primops.cc | 1 + src/libutil/types.hh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 01c7ca4441..543266b22a 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -44,6 +44,7 @@ struct InvalidPathError : EvalError Path path; InvalidPathError(const Path & path) : EvalError(format("path `%1%' is not valid") % path), path(path) {}; + ~InvalidPathError() throw () { }; }; diff --git a/src/libutil/types.hh b/src/libutil/types.hh index 4b5ce9a78c..906a959e30 100644 --- a/src/libutil/types.hh +++ b/src/libutil/types.hh @@ -41,8 +41,8 @@ public: BaseError(const FormatOrString & fs, unsigned int status = 1); ~BaseError() throw () { }; const char * what() const throw () { return err.c_str(); } - const string & msg() const throw () { return err; } - const string & prefix() const throw () { return prefix_; } + const string & msg() const { return err; } + const string & prefix() const { return prefix_; } BaseError & addPrefix(const FormatOrString & fs); };