http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56311
--- Comment #4 from devurandom at gmx dot net 2013-02-14 19:45:33 UTC --- Created attachment 29454 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29454 gcc-4.7.2-inclhack-hpux10_stdio_declarations.patch Attached patch fixes the issue for me. Someone with a HP-UX 10 system should probably test it, though! I added an $ anchor to the end of the match, to exclude the __iob_func() line that MinGW seems to use. If there is anything (e.g. a comment) after __iob on HP-UX 10, this will obviously fail! (But then it might have created bad code before, too.)