Commit 39c3654
committed
Do Not Define GOOGLE_FALLTHROUGH_INTENDED on GCC Without Attribute Support
The definition of GOOGLE_FALLTHROUGH_INTENDED assumed that
[[gnu::fallthrough]] was always available on GCC 7+. While
gnu::fallthrough is supported on GCC 7+, C++ attributes themselves are
not supported on GCC if the C++ standard is before C++11. As a fix,
the guard on this definition has been expanded to include a check for
C++ attribute support. The form of this check is the one recommended
by GCC at https://gcc.gnu.org/projects/cxx-status.html .1 parent c934cb7 commit 39c3654
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
0 commit comments