This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: v_cpp_message Can't Be Static
- To: brolley at cygnus dot com, law at cygnus dot com
- Subject: Re: v_cpp_message Can't Be Static
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Wed, 3 Jun 1998 12:33:09 -0400 (EDT)
- Cc: egcs at cygnus dot com
> From: Jeffrey A Law <law@cygnus.com>
> Date: Thu, 21 May 1998 17:02:56 -0600
>
> In message <35646302.B88081AA@cygnus.com>you write:
> > This is a multi-part message in MIME format.
> > --------------DC6A5C7C4BB20A166B685696
> > Content-Type: text/plain; charset=us-ascii
> > Content-Transfer-Encoding: 7bit
> >
> > Hi,
> >
> > v_cpp_message in cpperror.c can't be static since it is used in
> > cpplib.c. This breaks the build of cc1 when configured with
> > --enable-c-cpplib. The attached patch fixes the problem. OK to check
> > in?
> OK. Please put an external prototype for v_cpp_message in one of
> the .h files (cpplib.h perhaps) in addition to deleting the static
> prototype.
>
> You may also need to delete the copy of v_cpp_message in fix-header.
> jeff
I believe fix-header.c redefines its own copies of the various
cpp_* and v_cpp_* functions to get its own behavior and fix-header does
not link with cpperror.c. (Although, for some strange reason, it does
depend on cpperror.o in the Makefile. That's probably a bug.)
So IMHO removing v_cpp_message from fix-header.c would be wrong.
--Kaveh
PS: Here's a patch to fix the unneeded dependency.
Wed Jun 3 12:27:48 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (fix-header): Don't depend on cpperror.o.
--- Makefile.in~ Wed Jun 3 12:26:43 1998
+++ Makefile.in Wed Jun 3 12:27:15 1998
@@ -2026,7 +2026,7 @@
rm -rf fixtmp.c
fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
- cpplib.o cpphash.o cppalloc.o cppexp.o cpperror.o prefix.o version.o
+ cpplib.o cpphash.o cppalloc.o cppexp.o prefix.o version.o
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
scan-decls.o scan.o cpplib.o cpphash.o cppalloc.o prefix.o \
version.o cppexp.o $(HOST_LIBS)
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu Icon CMT Corp.