diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index ee913a017d23c72eaa1cc6724676cd965b457134..ae756b35fdb38d581be621312313bf48b0becc91 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -6875,6 +6875,9 @@ elaborate_entity (Entity_Id gnat_entity)
 	}
       break;
 
+      /* -Wswitch warning avoidance.  */
+    default:
+      break;
     }
 }
 
@@ -9705,7 +9708,7 @@ check_ok_for_atomic_type (tree type, Entity_Id gnat_entity, bool component_p)
        gnat_node = Next_Rep_Item (gnat_node))
     if (Nkind (gnat_node) == N_Pragma)
       {
-	unsigned char pragma_id
+	const Pragma_Id pragma_id
 	  = Get_Pragma_Id (Chars (Pragma_Identifier (gnat_node)));
 
 	if ((pragma_id == Pragma_Atomic && !component_p)
diff --git a/gcc/ada/gcc-interface/trans.cc b/gcc/ada/gcc-interface/trans.cc
index f5eadbbc895b99e80eb9dbb1b8d38e5887bdaec5..fd85facaf70fb3cf43ecd0ce006aed721413b87a 100644
--- a/gcc/ada/gcc-interface/trans.cc
+++ b/gcc/ada/gcc-interface/trans.cc
@@ -814,7 +814,7 @@ lvalue_required_p (Node_Id gnat_node, tree gnu_type, bool constant,
     case N_Pragma:
       if (Is_Pragma_Name (Chars (Pragma_Identifier (gnat_parent))))
 	{
-	  const unsigned char id
+	  const Pragma_Id id
 	    = Get_Pragma_Id (Chars (Pragma_Identifier (gnat_parent)));
 	  return id == Pragma_Inspection_Point;
 	}
@@ -1331,7 +1331,7 @@ Pragma_to_gnu (Node_Id gnat_node)
   if (!Is_Pragma_Name (Chars (Pragma_Identifier (gnat_node))))
     return gnu_result;
 
-  const unsigned char id
+  const Pragma_Id id
     = Get_Pragma_Id (Chars (Pragma_Identifier (gnat_node)));
 
   /* Save the expression of pragma Compile_Time_{Error|Warning} for later.  */
@@ -1670,7 +1670,8 @@ get_type_length (tree type, tree result_type)
    should place the result type.  ATTRIBUTE is the attribute ID.  */
 
 static tree
-Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
+Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p,
+		  Attribute_Id attribute)
 {
   const Node_Id gnat_prefix = Prefix (gnat_node);
   tree gnu_prefix = gnat_to_gnu (gnat_prefix);
@@ -2370,6 +2371,10 @@ Attribute_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, int attribute)
 	  case Attr_Bit_Position:
 	    gnu_result = gnu_field_bitpos;
 	    break;
+
+	    /* -Wswitch warning avoidance.  */
+	  default:
+	    break;
 	  }
 
 	/* If this has a PLACEHOLDER_EXPR, qualify it by the object we are
@@ -4292,7 +4297,7 @@ static void
 get_atomic_access (Node_Id gnat_node, atomic_acces_t *type, bool *sync)
 {
   Node_Id gnat_parent, gnat_temp;
-  unsigned char attr_id;
+  Attribute_Id attr_id;
 
   /* First, scan the parent to filter out irrelevant cases.  */
   gnat_parent = Parent (gnat_node);
@@ -6854,7 +6859,7 @@ gnat_to_gnu (Node_Id gnat_node)
     case N_Attribute_Reference:
       {
 	/* The attribute designator.  */
-	const int attr = Get_Attribute_Id (Attribute_Name (gnat_node));
+	const Attribute_Id attr = Get_Attribute_Id (Attribute_Name (gnat_node));
 
 	/* The Elab_Spec and Elab_Body attributes are special in that Prefix
 	   is a unit, not an object with a GCC equivalent.  */