This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix bootstrap on non-C99 systems


Eric Botcazou wrote:
The Fortran front-end now uses vsnprintf that, while being provided by Libiberty, is not declared anywhere on non-C99 systems, thus causing a bootstrap failure because of -Werror.

Fixed by the attached patch, bootstrapped/regtested on sparc-sun-solaris2.5.1 and x86_64-suse-linux, applied to mainline as obvious.

I think that the libiberty thinking is that in this situation the function ought to be declared in libiberty.h -- if no prototype appears in the system headers. In other words, guarded with #ifndef HAVE_DECL_VNSPRINTF. Making the fix in libiberty.h would help other uses of that library. In C++, this is of course an error inependent of -Werror.


Before you work hard on a patch, you probably ought to get DJ or Ian to confirm my understanding.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]