public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-12  8:47 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-12  8:47 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cc40d68c6d5d67d9c65adb940ae803737f915578

commit cc40d68c6d5d67d9c65adb940ae803737f915578
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.
    
    libcpp/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libcpp/Makefile.in                 |  4 ++--
 libgcc/libgcov-driver.c            |  2 +-
 10 files changed, 83 insertions(+), 64 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1b066ad6b14..59db72834dc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index fd20c360451..9e4c3fe5c16 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -96,7 +96,7 @@ libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
 all: libcpp.a $(USED_CATALOGS)
 
 .SUFFIXES:
-.SUFFIXES: .c .gmo .o .obj .po .pox
+.SUFFIXES: .cc .gmo .o .obj .po .pox
 
 libcpp.a: $(libcpp_a_OBJS)
 	-rm -f libcpp.a
@@ -223,7 +223,7 @@ endif
 
 # Implicit rules and I18N
 
-.c.o:
+.cc.o:
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-13 10:39 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-13 10:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c2764d3ba2da940c4fb3aeec0a3154f332591107

commit c2764d3ba2da940c4fb3aeec0a3154f332591107
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
            * config/avr/t-avr: Use CXXFLAGS_* and CXX_FOR_BUILD.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.
    
    libcpp/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/config/avr/t-avr               |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libcpp/Makefile.in                 |  4 ++--
 libgcc/libgcov-driver.c            |  2 +-
 11 files changed, 84 insertions(+), 65 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1b066ad6b14..59db72834dc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index 82f58dc6768..d7b1751b3b6 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -84,7 +84,7 @@ avr-mcus: $(srcdir)/doc/avr-mmcu.texi ; @true
 gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
   $(srcdir)/config/avr/avr-arch.h
-	$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
+	$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@
 
 gen-avr-mmcu-specs$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-specs.cc \
   $(AVR_MCUS) $(srcdir)/config/avr/avr-devices.cc \
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index fd20c360451..9e4c3fe5c16 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -96,7 +96,7 @@ libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
 all: libcpp.a $(USED_CATALOGS)
 
 .SUFFIXES:
-.SUFFIXES: .c .gmo .o .obj .po .pox
+.SUFFIXES: .cc .gmo .o .obj .po .pox
 
 libcpp.a: $(libcpp_a_OBJS)
 	-rm -f libcpp.a
@@ -223,7 +223,7 @@ endif
 
 # Implicit rules and I18N
 
-.c.o:
+.cc.o:
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-12  8:57 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-12  8:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5c1d7dc2e261340a8307dd8f034395197d3f0c6b

commit 5c1d7dc2e261340a8307dd8f034395197d3f0c6b
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.
    
    libcpp/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libcpp/Makefile.in                 |  4 ++--
 libgcc/libgcov-driver.c            |  2 +-
 10 files changed, 83 insertions(+), 64 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1b066ad6b14..59db72834dc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index fd20c360451..9e4c3fe5c16 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -96,7 +96,7 @@ libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
 all: libcpp.a $(USED_CATALOGS)
 
 .SUFFIXES:
-.SUFFIXES: .c .gmo .o .obj .po .pox
+.SUFFIXES: .cc .gmo .o .obj .po .pox
 
 libcpp.a: $(libcpp_a_OBJS)
 	-rm -f libcpp.a
@@ -223,7 +223,7 @@ endif
 
 # Implicit rules and I18N
 
-.c.o:
+.cc.o:
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-12  8:50 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-12  8:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:757edf7a1fbc2ffe418e0540a0db9c1378a89208

commit 757edf7a1fbc2ffe418e0540a0db9c1378a89208
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.
    
    libcpp/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libcpp/Makefile.in                 |  4 ++--
 libgcc/libgcov-driver.c            |  2 +-
 10 files changed, 83 insertions(+), 64 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1b066ad6b14..59db72834dc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index fd20c360451..9e4c3fe5c16 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -96,7 +96,7 @@ libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
 all: libcpp.a $(USED_CATALOGS)
 
 .SUFFIXES:
-.SUFFIXES: .c .gmo .o .obj .po .pox
+.SUFFIXES: .cc .gmo .o .obj .po .pox
 
 libcpp.a: $(libcpp_a_OBJS)
 	-rm -f libcpp.a
@@ -223,7 +223,7 @@ endif
 
 # Implicit rules and I18N
 
-.c.o:
+.cc.o:
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-12  8:25 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-12  8:25 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a417e18860bd1428ff6f2d3ceecfc70cb1bd20ba

commit a417e18860bd1428ff6f2d3ceecfc70cb1bd20ba
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libcpp/Makefile.in                 |  4 ++--
 libgcc/libgcov-driver.c            |  2 +-
 10 files changed, 83 insertions(+), 64 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 1b066ad6b14..59db72834dc 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index fd20c360451..9e4c3fe5c16 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -96,7 +96,7 @@ libcpp_a_SOURCES = charset.cc directives.cc errors.cc \
 all: libcpp.a $(USED_CATALOGS)
 
 .SUFFIXES:
-.SUFFIXES: .c .gmo .o .obj .po .pox
+.SUFFIXES: .cc .gmo .o .obj .po .pox
 
 libcpp.a: $(libcpp_a_OBJS)
 	-rm -f libcpp.a
@@ -223,7 +223,7 @@ endif
 
 # Implicit rules and I18N
 
-.c.o:
+.cc.o:
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-11 12:49 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-11 12:49 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:65bb0c6b03ed394669471befe54482858d982ee2

commit 65bb0c6b03ed394669471befe54482858d982ee2
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libgcc/libgcov-driver.c            |  2 +-
 9 files changed, 81 insertions(+), 62 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 7d319eaedf2..ee0b0d3f31a 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming.
@ 2022-01-11 12:48 Martin Liska
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Liska @ 2022-01-11 12:48 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b71d35918556d5f39a4f0cf1e04006ca77f67bd6

commit b71d35918556d5f39a4f0cf1e04006ca77f67bd6
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Jan 10 11:46:58 2022 +0100

    Manual changes for .cc renaming.
    
    gcc/ChangeLog:
    
            * Makefile.in: Rename .c names to .cc.
            * config.gcc: Likewise.
            * configure: Regenerate. Likewise.
            * configure.ac: Likewise.
            * gengtype.cc (set_gc_used): Likewise.
            (source_dot_c_frul): Likewise.
            (source_dot_cc_frul): Likewise.
            (struct file_rule_st): Likewise.
            (close_output_files): Likewise.
    
    gcc/ada/ChangeLog:
    
            * Makefile.rtl: Rename .c names to .cc.
            * gcc-interface/Make-lang.in: Likewise.
            * gcc-interface/Makefile.in: Likewise.
    
    libgcc/ChangeLog:
    
            * libgcov-driver.c: Rename .c names to .cc.

Diff:
---
 gcc/Makefile.in                    | 46 +++++++++++++++++++-------------------
 gcc/ada/Makefile.rtl               |  8 +++----
 gcc/ada/gcc-interface/Make-lang.in |  6 ++---
 gcc/ada/gcc-interface/Makefile.in  |  6 +++++
 gcc/config.gcc                     |  2 +-
 gcc/configure                      | 37 ++++++++++++++++++++++--------
 gcc/configure.ac                   |  6 ++---
 gcc/gengtype.cc                    | 30 ++++++++++---------------
 libgcc/libgcov-driver.c            |  2 +-
 9 files changed, 81 insertions(+), 62 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index e13bf66b040..31ff95500c9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1784,7 +1784,7 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
  gcc-ranlib$(exeext) \
  genversion$(build_exeext) gcov$(exeext) gcov-dump$(exeext) \
  gcov-tool$(exeect) \
- gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.c libbackend.a \
+ gengtype$(exeext) *.[0-9][0-9].* *.[si] *-checksum.cc libbackend.a \
  libcommon-target.a libcommon.a libgcc.mk perf.data
 
 # This symlink makes the full installation name of the driver be available
@@ -2421,10 +2421,10 @@ simple_generated_h	= $(simple_rtl_generated_h) insn-constants.h
 simple_generated_c	= $(simple_rtl_generated_c) insn-enums.cc
 
 $(simple_generated_h:insn-%.h=s-%) \
-$(simple_generated_c:insn-%.c=s-%): s-%: $(MD_DEPS)
+$(simple_generated_c:insn-%.cc=s-%): s-%: $(MD_DEPS)
 
 $(simple_rtl_generated_h:insn-%.h=s-%) \
-$(simple_rtl_generated_c:insn-%.c=s-%): s-%: insn-conditions.md
+$(simple_rtl_generated_c:insn-%.cc=s-%): s-%: insn-conditions.md
 
 $(simple_generated_h): insn-%.h: s-%; @true
 
@@ -2434,11 +2434,11 @@ $(simple_generated_h:insn-%.h=s-%): s-%: build/gen%$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-$*.h insn-$*.h
 	$(STAMP) s-$*
 
-$(simple_generated_c): insn-%.c: s-%; @true
-$(simple_generated_c:insn-%.c=s-%): s-%: build/gen%$(build_exeext)
+$(simple_generated_c): insn-%.cc: s-%; @true
+$(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
 	$(RUN_GEN) build/gen$*$(build_exeext) $(md_file) \
-	  $(filter insn-conditions.md,$^) > tmp-$*.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-$*.c insn-$*.c
+	  $(filter insn-conditions.md,$^) > tmp-$*.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
 	$(STAMP) s-$*
 
 # gencheck doesn't read the machine description, and the file produced
@@ -2449,12 +2449,12 @@ s-check : build/gencheck$(build_exeext)
 	$(SHELL) $(srcdir)/../move-if-change tmp-check.h tree-check.h
 	$(STAMP) s-check
 
-# genattrtab produces three files: tmp-{attrtab.c,dfatab.c,latencytab.c}
+# genattrtab produces three files: tmp-{attrtab.cc,dfatab.cc,latencytab.cc}
 insn-attrtab.cc insn-dfatab.cc insn-latencytab.cc: s-attrtab ; @true
 s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
   insn-conditions.md
 	$(RUN_GEN) build/genattrtab$(build_exeext) $(md_file) insn-conditions.md \
-		-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
+		-Atmp-attrtab.cc -Dtmp-dfatab.cc -Ltmp-latencytab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-attrtab.cc    insn-attrtab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-dfatab.cc     insn-dfatab.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-latencytab.cc insn-latencytab.cc
@@ -2464,7 +2464,7 @@ s-attrtab : $(MD_DEPS) build/genattrtab$(build_exeext) \
 insn-opinit.cc insn-opinit.h: s-opinit ; @true
 s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 	$(RUN_GEN) build/genopinit$(build_exeext) $(md_file) \
-	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.c
+	  insn-conditions.md -htmp-opinit.h -ctmp-opinit.cc
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.h insn-opinit.h
 	$(SHELL) $(srcdir)/../move-if-change tmp-opinit.cc insn-opinit.cc
 	$(STAMP) s-opinit
@@ -2472,8 +2472,8 @@ s-opinit: $(MD_DEPS) build/genopinit$(build_exeext) insn-conditions.md
 # gencondmd doesn't use the standard naming convention.
 build/gencondmd.cc: s-conditions; @true
 s-conditions: $(MD_DEPS) build/genconditions$(build_exeext)
-	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.c build/gencondmd.cc
+	$(RUN_GEN) build/genconditions$(build_exeext) $(md_file) > tmp-condmd.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-condmd.cc build/gencondmd.cc
 	$(STAMP) s-conditions
 
 insn-conditions.md: s-condmd; @true
@@ -2499,8 +2499,8 @@ insn-modes-inline.h: s-modes-inline-h; @true
 min-insn-modes.cc: s-modes-m; @true
 
 s-modes: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-modes.c insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) > tmp-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-modes.cc insn-modes.cc
 	$(STAMP) s-modes
 
 s-modes-h: build/genmodes$(build_exeext)
@@ -2515,8 +2515,8 @@ s-modes-inline-h: build/genmodes$(build_exeext)
 	$(STAMP) s-modes-inline-h
 
 s-modes-m: build/genmodes$(build_exeext)
-	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.c min-insn-modes.cc
+	$(RUN_GEN) build/genmodes$(build_exeext) -m > tmp-min-modes.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-min-modes.cc min-insn-modes.cc
 	$(STAMP) s-modes-m
 
 insn-preds.cc: s-preds; @true
@@ -2528,8 +2528,8 @@ mddump: $(BUILD_RTL) $(MD_DEPS) build/genmddump$(build_exeext)
 	$(RUN_GEN) build/genmddump$(build_exeext) $(md_file) > tmp-mddump.md
 
 s-preds: $(MD_DEPS) build/genpreds$(build_exeext)
-	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.c
-	$(SHELL) $(srcdir)/../move-if-change tmp-preds.c insn-preds.cc
+	$(RUN_GEN) build/genpreds$(build_exeext) $(md_file) > tmp-preds.cc
+	$(SHELL) $(srcdir)/../move-if-change tmp-preds.cc insn-preds.cc
 	$(STAMP) s-preds
 
 s-preds-h: $(MD_DEPS) build/genpreds$(build_exeext)
@@ -2734,8 +2734,8 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
 
 GTFILES_H = $(subst /,-, \
 	    $(shell echo $(patsubst $(srcdir)/%,gt-%, \
-			   $(patsubst %.c,%.h, \
-			     $(filter %.c, $(GTFILES)))) \
+			   $(patsubst %.cc,%.h, \
+			     $(filter %.cc, $(GTFILES)))) \
 			| sed -e "s|/[^ ]*/|/|g" -e "s|gt-config/|gt-|g"))
 
 GTFILES_LANG_H = $(patsubst [%], gtype-%.h, $(filter [%], $(GTFILES)))
@@ -3536,7 +3536,7 @@ mostlyclean: lang.mostlyclean
 	-rm -f gt-*
 	-rm -f gtype.state
 # Delete genchecksum outputs
-	-rm -f *-checksum.c
+	-rm -f *-checksum.cc
 # Delete lock-and-run bits
 	-rm -rf linkfe.lck lock-stamp.*
 
@@ -3574,7 +3574,7 @@ distclean: clean lang.distclean
 	-rm -f *.asm
 	-rm -f site.exp site.bak testsuite/site.exp testsuite/site.bak
 	-rm -f testsuite/*.log testsuite/*.sum
-	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.c
+	-cd testsuite && rm -f x *.x *.x? *.exe *.rpo *.o *.s *.S *.cc
 	-cd testsuite && rm -f *.out *.gcov *$(coverageexts)
 	-rm -rf ${QMTEST_DIR} stamp-qmtest
 	-rm -f .gdbinit configargs.h
@@ -4336,7 +4336,7 @@ TAGS: lang.tags
 	    incs="$$incs --include $$dir/TAGS.sub";	\
 	  fi;						\
 	done;						\
-	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.c c-family/*.cc \
+	$(ETAGS) -o TAGS.sub c-family/*.h c-family/*.cc c-family/*.cc \
 	      *.h *.c *.cc \
 	      ../include/*.h ../libiberty/*.c \
 	      ../libcpp/*.c ../libcpp/include/*.h \
diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
index 7d319eaedf2..ee0b0d3f31a 100644
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -2856,7 +2856,7 @@ LIBGNAT_TARGET_PAIRS += \
 
 # LIBGNAT_SRCS is the list of all C files (including headers) of the runtime
 # library.  LIBGNAT_OBJS is the list of object files for libgnat.
-# thread.c is special as put into GNATRTL_TASKING_OBJS
+# thread.cc is special as put into GNATRTL_TASKING_OBJS
 LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
   cal.o cio.o cstreams.o ctrl_c.o					\
   env.o errno.o exit.o expect.o final.o rtfinal.o rtinit.o		\
@@ -2870,7 +2870,7 @@ LIBGNAT_OBJS = adadecode.o adaint.o argv.o aux-io.o 			\
 #  GNAT_RTL_SRCS.  Right now we count on being able to build GNATRTL_OBJS
 #  from ADA_INCLUDE_SRCS.
 
-LIBGNAT_SRCS = $(patsubst %.o,%.c,$(LIBGNAT_OBJS))			\
+LIBGNAT_SRCS = $(patsubst %.o,%.cc,$(LIBGNAT_OBJS))			\
   adadecode.h adaint.h env.h gsocket.h raise.h standard.ads.h		\
   runtime.h $(EXTRA_LIBGNAT_SRCS)
 
@@ -2920,7 +2920,7 @@ setup-rts: force
 	$(MKDIR) $(RTSDIR)
 	$(CHMOD) u+w $(RTSDIR)
 # Copy target independent sources
-	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.c, \
+	$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS) libgnarl/thread.cc, \
 	  $(LN_S) $(GNAT_SRC)/$(f) $(RTSDIR) ;) true
 # Remove files not used
 	$(RM) $(patsubst %,$(RTSDIR)/%,$(ADA_EXCLUDE_FILES))
@@ -2941,7 +2941,7 @@ setup-rts: force
 	do \
 	  if [ -f $(RTSDIR)/$$f ]; then echo $$f >> $(RTSDIR)/libgnarl.lst; fi \
 	done
-	@echo thread.c >> $(RTSDIR)/libgnarl.lst
+	@echo thread.cc >> $(RTSDIR)/libgnarl.lst
 	@for f in \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.ads,$(F))) \
 	  $(foreach F,$(GNATRTL_NONTASKING_OBJS),$(subst $(objext),.adb,$(F))); \
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 40e7a9f670c..a8d8899d3c9 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -121,13 +121,13 @@ ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \
 # Say how to compile Ada programs.
 .SUFFIXES: .ada .adb .ads
 
-# FIXME: need to add $(ADA_CFLAGS) to .c.o suffix rule
+# FIXME: need to add $(ADA_CFLAGS) to .cc.o suffix rule
 # Use mildly strict warnings for this front end and add special flags.
 ada-warn = $(ADA_CFLAGS) $(filter-out -pedantic, $(STRICT_WARN))
 # Unresolved warnings in specific files.
 ada/adaint.o-warn = -Wno-error
 
-ada/%.o: ada/gcc-interface/%.c
+ada/%.o: ada/gcc-interface/%.cc
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -796,7 +796,7 @@ ada.srcextra:
 ada.srcman:
 
 ada.tags: force
-	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.c *.h *.ads *.adb && \
+	cd $(srcdir)/ada && $(ETAGS) -o TAGS.sub *.cc *.h *.ads *.adb && \
 	$(ETAGS) --include TAGS.sub --include ../TAGS.sub
 
 
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index cf645df12f1..54cf182a8c3 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -296,6 +296,10 @@ ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
 	  $(INCLUDES) $< $(OUTPUT_OPTION)
 
+.cc.o:
+	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \
+	  $(INCLUDES) $< $(OUTPUT_OPTION)
+
 .adb.o:
 	$(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION)
 
@@ -411,6 +415,7 @@ ifeq ($(TOOLSCASE),native)
   vpath %.ads ../$(RTSDIR) ../
   vpath %.adb ../$(RTSDIR) ../
   vpath %.c   ../$(RTSDIR) ../
+  vpath %.cc  ../$(RTSDIR) ../
   vpath %.h   ../$(RTSDIR) ../
 endif
 
@@ -420,6 +425,7 @@ ifeq ($(TOOLSCASE),cross)
   vpath %.ads ../
   vpath %.adb ../
   vpath %.c   ../
+  vpath %.cc  ../
   vpath %.h   ../
 endif
 
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 73ad94ec75f..ff1b4c369ba 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -5374,7 +5374,7 @@ case ${target} in
 		then
 			target_cpu_default2="\\\"$with_cpu\\\""
 		fi
-		out_file="${cpu_type}/${cpu_type}.c"
+		out_file="${cpu_type}/${cpu_type}.cc"
 		c_target_objs="${c_target_objs} ${cpu_type}-c.o"
 		cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"
 		d_target_objs="${d_target_objs} ${cpu_type}-d.o"
diff --git a/gcc/configure b/gcc/configure
index 992a9d70092..e787646c1d3 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -592,7 +592,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 PACKAGE_URL=
 
-ac_unique_file="tree.c"
+ac_unique_file="tree.cc"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -5352,7 +5352,26 @@ else
   GDC="$ac_cv_prog_GDC"
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D compiler works" >&5
+$as_echo_n "checking whether the D compiler works... " >&6; }
+if ${acx_cv_d_compiler_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.d <<EOF
+module conftest; int main() { return 0; }
+EOF
+acx_cv_d_compiler_works=no
 if test "x$GDC" != xno; then
+  errors=`(${GDC} -I"$srcdir"/d -c conftest.d) 2>&1 || echo failure`
+  if test x"$errors" = x && test -f conftest.$ac_objext; then
+    acx_cv_d_compiler_works=yes
+  fi
+  rm -f conftest.*
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_d_compiler_works" >&5
+$as_echo "$acx_cv_d_compiler_works" >&6; }
+if test "x$GDC" != xno && test x$acx_cv_d_compiler_works != xno; then
   have_gdc=yes
 else
   have_gdc=no
@@ -8297,7 +8316,7 @@ fi
   test -n "$AWK" && break
 done
 
-# We need awk to create options.c and options.h.
+# We need awk to create options.cc and options.h.
 # Bail out if it's missing.
 case ${AWK} in
   "") as_fn_error $? "can't build without awk, bailing out" "$LINENO" 5 ;;
@@ -12025,7 +12044,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
 # FREAD and FWRITE macros.  Fortunately, for GCC's single usage of ldgetname
-# in collect2.c, <fcntl.h> isn't visible, but the configure test below needs
+# in collect2.cc, <fcntl.h> isn't visible, but the configure test below needs
 # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME.
 for ac_func in ldgetname
 do
@@ -12601,7 +12620,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -13253,8 +13272,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
@@ -19561,7 +19580,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19564 "configure"
+#line 19583 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19667,7 +19686,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 19670 "configure"
+#line 19689 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -32221,7 +32240,7 @@ _ACEOF
 
 
 # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
-# of jit/jit-playback.c.
+# of jit/jit-playback.cc.
 gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"`
 echo "gcc_driver_version: ${gcc_driver_version}"
 cat > gcc-driver-name.h <<EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3dd210a8f8c..e8d2f6bbb62 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1824,7 +1824,7 @@ if test x$md_file = x
 then md_file=$cpu_type/$cpu_type.md; fi
 
 if test x$out_file = x
-then out_file=$cpu_type/$cpu_type.c; fi
+then out_file=$cpu_type/$cpu_type.cc; fi
 
 if test x"$tmake_file" = x
 then tmake_file=$cpu_type/t-$cpu_type
@@ -2294,8 +2294,8 @@ do
 done
 tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
 
-out_object_file=`basename $out_file .c`.o
-common_out_object_file=`basename $common_out_file .c`.o
+out_object_file=`basename $out_file .cc`.o
+common_out_object_file=`basename $common_out_file .cc`.o
 
 tm_file_list="options.h"
 tm_include_list="options.h insn-constants.h"
diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc
index e737c939457..386ae1b0506 100644
--- a/gcc/gengtype.cc
+++ b/gcc/gengtype.cc
@@ -1618,7 +1618,7 @@ set_gc_used (pair_p variables)
     printf ("%s used %d GTY-ed variables\n", progname, nbvars);
 }
 \f
-/* File mapping routines.  For each input file, there is one output .c file
+/* File mapping routines.  For each input file, there is one output .cc file
    (but some output files have many input files), and there is one .h file
    for the whole build.  */
 
@@ -1949,8 +1949,8 @@ struct file_rule_st {
 /* File rule action handling *.h files.  */
 static outf_p header_dot_h_frul (input_file*, char**, char**);
 
-/* File rule action handling *.c files.  */
-static outf_p source_dot_c_frul (input_file*, char**, char**);
+/* File rule action handling *.cc files.  */
+static outf_p source_dot_cc_frul (input_file*, char**, char**);
 
 #define NULL_REGEX (regex_t*)0
 
@@ -1970,9 +1970,9 @@ struct file_rule_st files_rules[] = {
      but are not shared.  */
 
   /* the c-family/ source directory is special.  */
-  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.c$",
+  { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.cc$",
     REG_EXTENDED, NULL_REGEX,
-    "gt-c-family-$3.h", "c-family/$3.c", NULL_FRULACT},
+    "gt-c-family-$3.h", "c-family/$3.cc", NULL_FRULACT},
 
   { DIR_PREFIX_REGEX "c-family/([[:alnum:]_-]*)\\.h$",
     REG_EXTENDED, NULL_REGEX,
@@ -2015,20 +2015,14 @@ struct file_rule_st files_rules[] = {
     REG_EXTENDED, NULL_REGEX,
     "gt-objc-objc-map.h", "objc/objc-map.cc", NULL_FRULACT },
 
-  /* General cases.  For header *.h and source *.c or *.cc files, we
+  /* General cases.  For header *.h and *.cc files, we
    * need special actions to handle the language.  */
 
-  /* Source *.c files are using get_file_gtfilename to compute their
-     output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
-  { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
-
   /* Source *.cc files are using get_file_gtfilename to compute their
      output_name and get_file_basename to compute their for_name
-     through the source_dot_c_frul action.  */
+     through the source_dot_cc_frul action.  */
   { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
-    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+    REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_cc_frul},
 
   /* Common header files get "gtype-desc.cc" as their output_name,
    * while language specific header files are handled specially.  So
@@ -2083,13 +2077,13 @@ header_dot_h_frul (input_file* inpf, char**poutname,
 }
 
 
-/* Special file rules action for handling *.c source files using
+/* Special file rules action for handling *.cc source files using
  * get_file_gtfilename to compute their output_name and
  * get_file_basename to compute their for_name.  The output_name is
  * gt-<LANG>-<BASE>.h for language specific source files, and
  * gt-<BASE>.h for common source files.  */
 static outf_p
-source_dot_c_frul (input_file* inpf, char**poutname, char**pforname)
+source_dot_cc_frul (input_file* inpf, char**poutname, char**pforname)
 {
   char *newbasename = CONST_CAST (char*, get_file_basename (inpf));
   char *newoutname = CONST_CAST (char*, get_file_gtfilename (inpf));
@@ -2371,8 +2365,8 @@ close_output_files (void)
 	{
 	  FILE *newfile = NULL;
 	  char *backupname = NULL;
-	  /* Back up the old version of the output file gt-FOO.c as
-	     BACKUPDIR/gt-FOO.c~ if we have a backup directory.  */
+	  /* Back up the old version of the output file gt-FOO.cc as
+	     BACKUPDIR/gt-FOO.cc~ if we have a backup directory.  */
 	  if (backup_dir)
 	    {
 	      backupname = concat (backup_dir, "/",
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index dcd77f7aae5..7e52c5676e5 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -79,7 +79,7 @@ static int gcov_error (const char *, ...);
 static void gcov_error_exit (void);
 #endif
 
-#include "gcov-io.c"
+#include "gcov-io.cc"
 
 #define GCOV_PROF_PREFIX "libgcov profiling error:%s:"


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-13 10:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  8:47 [gcc(refs/users/marxin/heads/cc-renaming)] Manual changes for .cc renaming Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2022-01-13 10:39 Martin Liska
2022-01-12  8:57 Martin Liska
2022-01-12  8:50 Martin Liska
2022-01-12  8:25 Martin Liska
2022-01-11 12:49 Martin Liska
2022-01-11 12:48 Martin Liska

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