diff --git a/sycl/include/sycl/exception.hpp b/sycl/include/sycl/exception.hpp index c228a2926acc..728a7a222d35 100644 --- a/sycl/include/sycl/exception.hpp +++ b/sycl/include/sycl/exception.hpp @@ -150,53 +150,6 @@ class __SYCL_EXPORT exception : public virtual std::exception { pi_int32 pi_err); }; -class __SYCL2020_DEPRECATED( - "use sycl::exception with sycl::errc::runtime instead.") runtime_error - : public exception { -public: - runtime_error() : exception(make_error_code(errc::runtime)) {} - - runtime_error(const char *Msg, pi_int32 Err) - : runtime_error(std::string(Msg), Err) {} - - runtime_error(const std::string &Msg, pi_int32 Err) - : exception(make_error_code(errc::runtime), Msg, Err) {} - - runtime_error(std::error_code Ec, const std::string &Msg, - const pi_int32 PIErr) - : exception(Ec, Msg, PIErr) {} - -protected: - runtime_error(std::error_code Ec) : exception(Ec) {} -}; - -class __SYCL2020_DEPRECATED( - "use sycl::exception with sycl::errc::nd_range instead.") nd_range_error - : public runtime_error { -public: - nd_range_error() : runtime_error(make_error_code(errc::nd_range)) {} - - nd_range_error(const char *Msg, pi_int32 Err) - : nd_range_error(std::string(Msg), Err) {} - - nd_range_error(const std::string &Msg, pi_int32 Err) - : runtime_error(make_error_code(errc::nd_range), Msg, Err) {} -}; - -class __SYCL2020_DEPRECATED( - "use sycl::exception with a sycl::errc enum value instead.") - invalid_parameter_error : public runtime_error { -public: - invalid_parameter_error() - : runtime_error(make_error_code(errc::kernel_argument)) {} - - invalid_parameter_error(const char *Msg, pi_int32 Err) - : invalid_parameter_error(std::string(Msg), Err) {} - - invalid_parameter_error(const std::string &Msg, pi_int32 Err) - : runtime_error(make_error_code(errc::kernel_argument), Msg, Err) {} -}; - } // namespace _V1 } // namespace sycl diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index c9df81f8b306..aa0b4b3553ec 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -85,12 +85,6 @@ int main() { // expected-warning@+1 {{'get_size' is deprecated: get_size() is deprecated, please use byte_size() instead}} size_t VecGetSize = Vec.get_size(); - // expected-warning@+1 {{'runtime_error' is deprecated: use sycl::exception with sycl::errc::runtime instead.}} - sycl::runtime_error re; - // expected-warning@+1 {{'nd_range_error' is deprecated: use sycl::exception with sycl::errc::nd_range instead.}} - sycl::nd_range_error ne; - // expected-warning@+1 {{'invalid_parameter_error' is deprecated: use sycl::exception with a sycl::errc enum value instead.}} - sycl::invalid_parameter_error ipe; // expected-warning@+1{{'exception' is deprecated: The version of an exception constructor which takes no arguments is deprecated.}} sycl::exception ex;