Commit e9a00cf
Fix GCC -Werror=terminate in WithAsyncStack await_suspend
Summary:
In D90950367, I added conditional `noexcept` to `await_suspend`.
The function became `noexcept(true)` when the inner awaiter's `await_suspend` is noexcept.
GCC warns that `throw;` in a `noexcept` function will always call `terminate` (`-Werror=terminate`).
Unfortunately, GCC's warning analysis wasn't smart enough to realize that the `throw` is unreachable, so certain build configurations broke due to this warning.
The workaround is to make the `try-catch` conditional on `noexcept`. This seems cleaner than just suppressing the warning.
Reviewed By: ispeters
Differential Revision: D91366908
fbshipit-source-id: cd59c77723f583d9716f3a8336b6f473c508a8431 parent ea24fa5 commit e9a00cf
1 file changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | | - | |
134 | | - | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
149 | | - | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
164 | 175 | | |
165 | 176 | | |
166 | 177 | | |
| |||
0 commit comments