This is the mail archive of the gcc@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]

Re: v_cpp_message Can't Be Static


 > 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.


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