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]

[gcc-in-cxx] Don't use extern "C" in dfp.c


I reverted part of my patch of 2009-05-26: dfp.c no longer uses extern
"C".  Committed to gcc-in-cxx branch.

Ian


2009-05-31  Ian Lance Taylor  <iant@google.com>

	Revert last patch.
	2009-05-26  Ian Lance Taylor  <iant@google.com>
	* dfp.c: If __cplusplus, use extern "C" around inclusion of
	libdecnumber header files.
	* Makefile.in (INCLUDES): Remove $(DECNUMINC).
	(dfp.o): Add separate compilation command using DECNUMINC.


Index: Makefile.in
===================================================================
--- Makefile.in	(revision 147976)
+++ Makefile.in	(working copy)
@@ -983,7 +983,8 @@ BUILD_ERRORS = build/errors.o
 # libintl.h will be found in ../intl if we are using the included libintl.
 INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
 	   -I$(srcdir)/../include @INCINTL@ \
-	   $(CPPINC) $(GMPINC) $(PPLINC) $(CLOOGINC)
+	   $(CPPINC) $(GMPINC) $(DECNUMINC) \
+	   $(PPLINC) $(CLOOGINC)
 
 # [gcc-in-cxx] Keep the .c extension, but compile with C++.
 .c.o:
@@ -2061,11 +2062,6 @@ endif
 	-DDEVPHASE=$(DEVPHASE_s) -DPKGVERSION=$(PKGVERSION_s) \
 	-DBUGURL=$(BUGURL_s) -c $(srcdir)/version.c $(OUTPUT_OPTION)
 
-dfp.o: dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)	$(TREE_H) \
-   $(TOPLEV_H) $(TM_P_H) $(REAL_H) $(DECNUM_H)
-	$(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(DECNUMINC) -c \
-		$(srcdir)/dfp.c $(OUTPUT_OPTION)
-
 gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
 	$(VARRAY_H) $(HASHTAB_H) $(SPLAY_TREE_H) $(OBSTACK_H) $(BITMAP_H) \
 	input.h $(TREE_H) $(RTL_H) $(FUNCTION_H) insn-config.h $(EXPR_H) \
@@ -2638,6 +2634,8 @@ emit-rtl.o : emit-rtl.c $(CONFIG_H) $(SY
    $(REAL_H) $(DF_H)
 real.o : real.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
    $(TOPLEV_H) $(TM_P_H) $(REAL_H) dfp.h
+dfp.o : dfp.c dfp.h $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H)	$(TREE_H) \
+   $(TOPLEV_H) $(TM_P_H) $(REAL_H) $(DECNUM_H)
 fixed-value.o: fixed-value.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) fixed-value.h $(REAL_H) $(TOPLEV_H)
 integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
Index: dfp.c
===================================================================
--- dfp.c	(revision 147976)
+++ dfp.c	(working copy)
@@ -28,12 +28,6 @@ along with GCC; see the file COPYING3.  
 #include "tm_p.h"
 #include "dfp.h"
 
-#ifdef __cplusplus
-/* libdecnumber is always built with a C compiler, not a C++
-   compiler.  */
-extern "C" {
-#endif
-
 /* The order of the following headers is important for making sure
    decNumber structure is large enough to hold decimal128 digits.  */
 
@@ -43,10 +37,6 @@ extern "C" {
 #include "decimal32.h"
 #include "decNumber.h"
 
-#ifdef __cplusplus
-}
-#endif
-
 #ifndef WORDS_BIGENDIAN
 #define WORDS_BIGENDIAN 0
 #endif

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