[Bug fortran/78822] [cleanup] replace static char buffers by std:string

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 16 12:32:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78822

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Oh, and yet another thing, if these messages is something you pass to the user,
then the fact that you mix up the diagnostic text with expanded arguments
precludes translation.  With using std::stringstream etc. I'm afraid it is out
of luck to translate it, with build_message_string you'd need to wrap the
format strings you want to translate into _(...), or add a wrapper for
build_message_string that would have a *gmsgid called first argument and would
invoke _(gmsgid) on it before passing it over to build_message_string (and
verify exgettext picks those up properly).


More information about the Gcc-bugs mailing list