Blob Blame History Raw
diff --git a/src/adapters/compiler/gcc-plugin/scorep_plugin_attribute.cpp b/src/adapters/compiler/gcc-plugin/scorep_plugin_attribute.cpp
index 5868e2b..da8d92f 100644
--- a/src/adapters/compiler/gcc-plugin/scorep_plugin_attribute.cpp
+++ b/src/adapters/compiler/gcc-plugin/scorep_plugin_attribute.cpp
@@ -17,6 +17,7 @@
  *
  */
 
+#include <string>
 #include "scorep_plugin_gcc-plugin.h"
 
 #include <config.h>
diff --git a/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_hook.inc.c b/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_hook.inc.c
index 190d28e..1c7a9c6 100644
--- a/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_hook.inc.c
+++ b/src/adapters/compiler/gcc-plugin/scorep_plugin_inst_hook.inc.c
@@ -16,6 +16,7 @@
  * @brief  The definition for the instrumentation hooks of the GCC plugin.
  *
  */
+#include <string>
 
 #include "tree.h"
 
@@ -77,6 +78,8 @@ build_inst_function( scorep_gcc_plugin_hook_type hook_type,
         case EXIT:
             func_decl = build_fn_decl( exit_hook_name, func_type_list );
             break;
+	default:
+	  __builtin_unreachable ();
     }
 
     TREE_PUBLIC( func_decl ) = 1;
@@ -107,6 +110,8 @@ build_condition( scorep_gcc_plugin_hook_type hook_type,
                                                      -1 /* SCOREP_FILTERED_REGION */ ),
                                       NULL_TREE,
                                       NULL_TREE );
+	default:
+	  __builtin_unreachable ();
     }
 } /* build_condition */
 
@@ -129,6 +134,8 @@ build_fn_call( scorep_gcc_plugin_hook_type hook_type,
             return gimple_build_call( hook->fn_decl,
                                       1,
                                       gimple_assign_lhs( tmp_assignment ) );
+	default:
+	  __builtin_unreachable ();
     }
 } /* build_fn_call */
 
diff --git a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.cpp b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.cpp
index 28480f4..76e7d21 100644
--- a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.cpp
+++ b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.cpp
@@ -20,5 +20,6 @@
 #include "scorep_plugin_gcc-plugin.h"
 
 #include <config.h>
+#include <string>
 
 #include "scorep_plugin_pass_instrument.inc.c"
diff --git a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c
index 2b8abab..9d1d98d 100644
--- a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c
+++ b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c
@@ -57,6 +57,12 @@
 #include "scorep_plugin_inst_handle.h"
 #include "scorep_plugin_inst_hook.h"
 
+/* DECL_IS_BUILTIN no longer exists in gcc-11, but the same capability
+   is available under a different name.  */
+#ifndef DECL_IS_BUILTIN
+#define DECL_IS_BUILTIN DECL_IS_UNDECLARED_BUILTIN
+#endif
+
 #define VERBOSE_MSG( level, msg, ... ) \
     do \
     { \
diff --git a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c.plugin b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c.plugin
index e38ffe7..5e8423f 100644
--- a/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c.plugin
+++ b/src/adapters/compiler/gcc-plugin/scorep_plugin_pass_instrument.inc.c.plugin
@@ -57,6 +57,12 @@
 #include "scorep_plugin_inst_handle.h"
 #include "scorep_plugin_inst_hook.h"
 
+/* DECL_IS_BUILTIN no longer exists in gcc-11, but the same capability
+   is available under a different name.  */
+#ifndef DECL_IS_BUILTIN
+#define DECL_IS_BUILTIN DECL_IS_UNDECLARED_BUILTIN
+#endif
+
 #define VERBOSE_MSG( level, msg, ... ) \
     do \
     { \