------- Comment #4 from burnus at gcc dot gnu dot org 2010-03-04 17:56 ------- Another patch - please try!
Index: libgfortran.h =================================================================== --- libgfortran.h (revision 157215) +++ libgfortran.h (working copy) @@ -121,2 +121,9 @@ extern int __mingw_snprintf (char *, siz +/* MinGW needs to use the gnu_printf formatter. */ +#if __MINGW32__ +# define PRINTF_FORMAT gnu_printf +#else +# define PRINTF_FORMAT printf +#endif + @@ -705,3 +712,3 @@ internal_proto(show_locus); extern void runtime_error (const char *, ...) - __attribute__ ((noreturn, format (printf, 1, 2))); + __attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2))); iexport_proto(runtime_error); @@ -709,3 +716,3 @@ iexport_proto(runtime_error); extern void runtime_error_at (const char *, const char *, ...) - __attribute__ ((noreturn, format (printf, 2, 3))); + __attribute__ ((noreturn, format (PRINTF_FORMAT, 2, 3))); iexport_proto(runtime_error_at); @@ -713,3 +720,3 @@ iexport_proto(runtime_error_at); extern void runtime_warning_at (const char *, const char *, ...) - __attribute__ ((format (printf, 2, 3))); + __attribute__ ((format (PRINTF_FORMAT, 2, 3))); iexport_proto(runtime_warning_at); @@ -797,3 +804,3 @@ internal_proto(unit_to_fd); extern int st_printf (const char *, ...) - __attribute__ ((format (printf, 1, 2))); + __attribute__ ((format (PRINTF_FORMAT, 1, 2))); internal_proto(st_printf); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42950