aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gprofng/common/gp-defs.h8
-rw-r--r--gprofng/src/gp-collect-app.cc2
2 files changed, 9 insertions, 1 deletions
diff --git a/gprofng/common/gp-defs.h b/gprofng/common/gp-defs.h
index 440bfb1..e92c33e 100644
--- a/gprofng/common/gp-defs.h
+++ b/gprofng/common/gp-defs.h
@@ -55,4 +55,12 @@
#define WSIZE_32 1
#endif
+#ifndef ATTRIBUTE_FALLTHROUGH
+# if (GCC_VERSION >= 7000)
+# define ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# else
+# define ATTRIBUTE_FALLTHROUGH /* Fall through */
+# endif
+#endif
+
#endif
diff --git a/gprofng/src/gp-collect-app.cc b/gprofng/src/gp-collect-app.cc
index a40cf8f..34874b8 100644
--- a/gprofng/src/gp-collect-app.cc
+++ b/gprofng/src/gp-collect-app.cc
@@ -848,7 +848,7 @@ collect::check_args (int argc, char *argv[])
}
case 'O':
overwriteExp = true;
- /* FALLTHROUGH */
+ ATTRIBUTE_FALLTHROUGH
case 'o':
if (precheck == 1)
{