[Bug c++/105626] -Wformat should accept u8"" strings
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 17 13:10:42 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105626
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Possible fix:
--- a/gcc/c-family/c-format.cc
+++ b/gcc/c-family/c-format.cc
@@ -1742,7 +1742,8 @@ check_format_arg (void *ctx, tree format_tree,
}
tree underlying_type
= TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (format_tree)));
- if (underlying_type != char_type_node)
+ if (underlying_type != char_type_node
+ && !(flag_char8_t && underlying_type == char8_type_node))
{
if (underlying_type == char16_type_node
|| underlying_type == char32_type_node
More information about the Gcc-bugs
mailing list