This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix bootstrap on non-C99 systems
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Apr 2005 12:23:02 -0700
- Subject: Re: Fix bootstrap on non-C99 systems
- Organization: CodeSourcery, LLC
- References: <200504131110.40097.ebotcazou@libertysurf.fr>
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