public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gcc-in-cxx] Don't use extern "C" in dfp.c
@ 2009-06-01  5:32 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2009-06-01  5:32 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

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.



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Revert use of extern \"C\" in dfp.c --]
[-- Type: text/x-patch, Size: 2341 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-01  5:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-01  5:32 [gcc-in-cxx] Don't use extern "C" in dfp.c Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).