https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65174

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
FWIW clang and EDG both fail the first two static assertions here, while GCC
passes all three:

struct foo {
    ~foo() throw(int) {}
};

int main() {
    static_assert( noexcept(delete static_cast<foo*>(nullptr)), "");
    static_assert( noexcept(delete static_cast<foo*>(0)), "");
    static_assert( !noexcept(delete (1+static_cast<foo*>(0))), "");
}

Reply via email to