https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124394
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
You're right, and that is even implemented:
if (TREE_CODE (r) != NAMESPACE_DECL && DECL_LANGUAGE (r) == lang_c)
return boolean_false_node;
