https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78822
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Comment on attachment 40350 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40350 patch using build_message_string Some comments: 1) this still doesn't solve the translations issue in many places (gfc_compare_interfaces etc.); in some places you use _(...) already because it used to be there before as well; note as I said earlier, you can either always use it explicitly, or add build_message_string/xasvprintf wrapper that will automatically mark its argument for translation and translate it 2) if in the different functions that return bool you always return true if you set *errmsg and return false if you don't set it (or vice versa), then you could change those functions to return const char * and in the caller test for == NULL (meaning success) and != NULL (return value is the error string to emit and free afterwards. 3) + *errmsg = build_message_string ("CONTIGUOUS attribute mismatch in " "function result"); the formatting looks wrong, "function should be below "CONTIGUOUS.