http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53552
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2012-06-04 14:03:03 UTC --- (In reply to comment #2) > > I think as part of the implementation, one should pass to gfc_warning the flag > which triggers it (or 0 for default warning), similar to "warning_at"; > example: > warning_at (loc, OPT_Wcast_qual, ... This is a must to fix this bug and PR44054, whether you wish to use the common diagnostics code or not. > For hooking up front-end warnings, maybe java/lang.c can be of some help. Or > cp/error.c (esp. cp_print_error_function and cp_printer). Note that you don't actually need to implement a pretty-printer to get this bug and PR44054 fixed. The diagnostics.c code does not (if it does, it is a bug) look into the string, you only need to "fake" a pretty-printer well enough that calls the existing Fortran equivalent of a pretty-printer to process the string.