c++: Not all character types are byte-access types.
[gcc.git] / gcc / cp / tree.c
index 7e763479f7a9248423b5c4bc9b7020171d548605..63ce9acd7a6f496c0f8b0f2e79b133be7cf5f034 100644 (file)
@@ -4100,13 +4100,14 @@ is_dummy_object (const_tree ob)
          && TREE_OPERAND (ob, 0) == void_node);
 }
 
-/* Returns true if TYPE is a character type or std::byte.  */
+/* Returns true if TYPE is char, unsigned char, or std::byte.  */
 
 bool
 is_byte_access_type (tree type)
 {
   type = TYPE_MAIN_VARIANT (type);
-  if (char_type_p (type))
+  if (type == char_type_node
+      || type == unsigned_char_type_node)
     return true;
 
   return (TREE_CODE (type) == ENUMERAL_TYPE