Skip to content

Commit

Permalink
Backport a fix to avoid a GCC 4.8 bug relating to moved exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Orvid committed Aug 1, 2016
1 parent 86c5177 commit c1559a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hphp/runtime/base/builtin-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ void throw_object(const Object& e) {
throw req::root<Object>(e);
}

#if ((__GNUC__ != 4) || (__GNUC_MINOR__ != 8) || __GNUC_PATCHLEVEL__ >= 2)
#if ((__GNUC__ != 4) || (__GNUC_MINOR__ != 8))
void throw_object(Object&& e) {
throw req::root<Object>(std::move(e));
}
Expand Down
4 changes: 2 additions & 2 deletions hphp/runtime/base/builtin-functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ Object create_object(const String& s, const Array &params, bool init = true);
Object init_object(const String& s, const Array &params, ObjectData* o);

[[noreturn]] void throw_object(const Object& e);
#if ((__GNUC__ != 4) || (__GNUC_MINOR__ != 8) || __GNUC_PATCHLEVEL__ >= 2)
// gcc-4.8.1 has a bug that causes incorrect code if we
#if ((__GNUC__ != 4) || (__GNUC_MINOR__ != 8))
// gcc-4.8 has a bug that causes incorrect code if we
// define this function.
[[noreturn]] void throw_object(Object&& e);
#endif
Expand Down

0 comments on commit c1559a0

Please sign in to comment.