else if (TREE_CODE (id) == IDENTIFIER_NODE
&& (id_equal (id, "module") || id_equal (id, "import")))
{
- if (!modules_p ())
- inform (location, "%qE only available with %<-fmodules-ts%>", id);
- else
- inform (location, "%qE was not recognized as a module control-line",
+ if (modules_p ())
+ inform (location, "%qE is not recognized as a module control-line",
+ id);
+ else if (cxx_dialect < cxx20)
+ inform (location, "C++20 %qE only available with %<-fmodules-ts%>",
id);
+ else
+ inform (location, "C++20 %qE only available with %<-fmodules-ts%>"
+ ", which is not yet enabled with %<-std=c++20%>", id);
}
else if (cxx_dialect < cxx11
&& TREE_CODE (id) == IDENTIFIER_NODE