Patch: gcc.c: cpp_spec NULL initializers
RDBrown@mira.net
RDBrown@mira.net
Sat Mar 17 05:15:00 GMT 2001
In gcc/gcc.c supply NULL cpp_spec initializers in default_compilers
to silence warnings.
stage2/xgcc -Bstage2/ -B/usr/local/hppa2.0-hp-hpux10.20/bin/ -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc-20010312/gcc -I../../gcc-20010312/gcc/. -I../../gcc-20010312/gcc/config -I../../gcc-20010312/gcc/../include \
-DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"3.0\" -DDEFAULT_TARGET_MACHINE=\"hppa2.0-hp-hpux10.20\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "${SHLIB_LINK}" -a "yes" = "yes" && echo "-DENABLE_SHARED_LIBGCC"` `test "${SHLIB_MULTILIB}" && echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
-c ../../gcc-20010312/gcc/gcc.c)
../../gcc-20010312/gcc/gcc.c:611: warning: string length `893' is greater than the length `509' ISO C89 compilers are required to support
../../gcc-20010312/gcc/gcc.c:732: warning: missing initializer
../../gcc-20010312/gcc/gcc.c:732: warning: (near initialization for `default_compilers[0].cpp_spec')
....
../../gcc-20010312/gcc/gcc.c:776: warning: missing initializer
../../gcc-20010312/gcc/gcc.c:776: warning: (near initialization for `default_compilers[37].cpp_spec')
In file included from specs.h:1,
from ../../gcc-20010312/gcc/gcc.c:777:
../../gcc-20010312/gcc/cp/lang-specs.h:25: warning: missing initializer
../../gcc-20010312/gcc/cp/lang-specs.h:25: warning: (near initialization for `default_compilers[38].cpp_spec')
....
../../gcc-20010312/gcc/cp/lang-specs.h:62: warning: missing initializer
../../gcc-20010312/gcc/cp/lang-specs.h:62: warning: (near initialization for `default_compilers[46].cpp_spec')
In file included from specs.h:2,
from ../../gcc-20010312/gcc/gcc.c:777:
../../gcc-20010312/gcc/f/lang-specs.h:27: warning: missing initializer
../../gcc-20010312/gcc/f/lang-specs.h:27: warning: (near initialization for `default_compilers[47].cpp_spec')
....
../../gcc-20010312/gcc/f/lang-specs.h:59: warning: string length `544' is greater than the length `509' ISO C89 compilers are required to support
../../gcc-20010312/gcc/f/lang-specs.h:59: warning: missing initializer
../../gcc-20010312/gcc/f/lang-specs.h:59: warning: (near initialization for `default_compilers[57].cpp_spec')
In file included from specs.h:3,
from ../../gcc-20010312/gcc/gcc.c:777:
../../gcc-20010312/gcc/objc/lang-specs.h:24: warning: missing initializer
../../gcc-20010312/gcc/objc/lang-specs.h:24: warning: (near initialization for `default_compilers[58].cpp_spec')
...
../../gcc-20010312/gcc/objc/lang-specs.h:43: warning: missing initializer
../../gcc-20010312/gcc/objc/lang-specs.h:43: warning: (near initialization for `default_compilers[61].cpp_spec')
../../gcc-20010312/gcc/gcc.c:779: warning: missing initializer
../../gcc-20010312/gcc/gcc.c:779: warning: (near initialization for `default_compilers[62].cpp_spec')
20001-03-12 Rodney Brown <RodneyBrown@mynd.com>
* gcc.c (default_compilers): Add NULL cpp_spec initializers.
{cp,f,java,objc}/ChangeLog
20001-03-12 Rodney Brown <RodneyBrown@mynd.com>
* lang-specs.h: Add NULL cpp_spec initializers.
--- gcc/gcc.c.orig Fri Mar 16 11:49:38 2001
+++ gcc/gcc.c Fri Mar 16 18:47:20 2001
@@ -729,19 +729,22 @@
were not present when we built the driver, we will hit these copies
and be given a more meaningful error than "file not used since
linking is not done". */
- {".m", "#Objective-C"}, {".mi", "#Objective-C"},
- {".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"}, {".cp", "#C++"},
- {".c++", "#C++"}, {".C", "#C++"}, {".ii", "#C++"},
- {".ads", "#Ada"}, {".adb", "#Ada"}, {".ada", "#Ada"},
- {".f", "#Fortran"}, {".for", "#Fortran"}, {".fpp", "#Fortran"},
- {".F", "#Fortran"}, {".FOR", "#Fortran"}, {".FPP", "#Fortran"},
- {".r", "#Ratfor"},
- {".p", "#Pascal"}, {".pas", "#Pascal"},
- {".ch", "#Chill"}, {".chi", "#Chill"},
- {".java", "#Java"}, {".class", "#Java"},
- {".zip", "#Java"}, {".jar", "#Java"},
+ {".m", "#Objective-C", NULL}, {".mi", "#Objective-C", NULL},
+ {".cc", "#C++", NULL}, {".cxx", "#C++", NULL},
+ {".cpp", "#C++", NULL}, {".cp", "#C++", NULL},
+ {".c++", "#C++", NULL}, {".C", "#C++", NULL}, {".ii", "#C++", NULL},
+ {".ads", "#Ada", NULL}, {".adb", "#Ada", NULL}, {".ada", "#Ada", NULL},
+ {".f", "#Fortran", NULL}, {".for", "#Fortran", NULL},
+ {".fpp", "#Fortran", NULL},
+ {".F", "#Fortran", NULL}, {".FOR", "#Fortran", NULL},
+ {".FPP", "#Fortran", NULL},
+ {".r", "#Ratfor", NULL},
+ {".p", "#Pascal", NULL}, {".pas", "#Pascal", NULL},
+ {".ch", "#Chill", NULL}, {".chi", "#Chill", NULL},
+ {".java", "#Java", NULL}, {".class", "#Java", NULL},
+ {".zip", "#Java", NULL}, {".jar", "#Java", NULL},
/* Next come the entries for C. */
- {".c", "@c"},
+ {".c", "@c", NULL},
{"@c",
/* cc1 has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps or -traditional is given. */
@@ -756,27 +759,27 @@
cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}\
%{!traditional:%{!ftraditional:%{!traditional-cpp:\
cc1 -lang-c %{ansi:-std=c89} %(cpp_options) %(cc1_options)}}}}\
- %{!fsyntax-only:%(invoke_as)}}}}"},
+ %{!fsyntax-only:%(invoke_as)}}}}", NULL},
{"-",
"%{!E:%e-E required when input is from standard input}\
- %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"},
- {".h", "@c-header"},
+ %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", NULL},
+ {".h", "@c-header", NULL},
{"@c-header",
"%{!E:%eCompilation of header file requested} \
- %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"},
- {".i", "@cpp-output"},
+ %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", NULL},
+ {".i", "@cpp-output", NULL},
{"@cpp-output",
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}"},
- {".s", "@assembler"},
+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", NULL},
+ {".s", "@assembler", NULL},
{"@assembler",
- "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"},
- {".S", "@assembler-with-cpp"},
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}", NULL},
+ {".S", "@assembler-with-cpp", NULL},
{"@assembler-with-cpp",
"%(trad_capable_cpp) -lang-asm %(cpp_options)\
- %{!M:%{!MM:%{!E:%(invoke_as)}}}"},
+ %{!M:%{!MM:%{!E:%(invoke_as)}}}", NULL},
#include "specs.h"
/* Mark end of table */
- {0, 0}
+ {0, 0, NULL}
};
/* Number of elements in default_compilers, not counting the terminator. */
--- gcc/cp/lang-specs.h.orig Wed Mar 7 11:32:13 2001
+++ gcc/cp/lang-specs.h Fri Mar 16 18:51:05 2001
@@ -22,12 +22,12 @@
/* This is the contribution to the `default_compilers' array in gcc.c for
g++. */
- {".cc", "@c++"},
- {".cp", "@c++"},
- {".cxx", "@c++"},
- {".cpp", "@c++"},
- {".c++", "@c++"},
- {".C", "@c++"},
+ {".cc", "@c++", NULL},
+ {".cp", "@c++", NULL},
+ {".cxx", "@c++", NULL},
+ {".cpp", "@c++", NULL},
+ {".c++", "@c++", NULL},
+ {".C", "@c++", NULL},
{"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */
@@ -50,13 +50,15 @@
%{ansi:-D__STRICT_ANSI__}}\
%{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e1*}\
- %{!fsyntax-only:%(invoke_as)}}}}"
+ %{!fsyntax-only:%(invoke_as)}}}}",
#ifdef CPLUSPLUS_CPP_SPEC
- , CPLUSPLUS_CPP_SPEC
+ CPLUSPLUS_CPP_SPEC
+#else
+ NULL
#endif
},
- {".ii", "@c++-cpp-output"},
+ {".ii", "@c++-cpp-output", NULL},
{"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\
cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
- %{!fsyntax-only:%(invoke_as)}}}}"},
+ %{!fsyntax-only:%(invoke_as)}}}}", NULL},
--- gcc/f/lang-specs.h.orig Tue Oct 3 11:48:26 2000
+++ gcc/f/lang-specs.h Fri Mar 16 18:53:26 2001
@@ -24,23 +24,25 @@
/* This is the contribution to the `default_compilers' array in gcc.c for
g77. */
- {".F", "@f77-cpp-input"},
- {".fpp", "@f77-cpp-input"},
- {".FPP", "@f77-cpp-input"},
+ {".F", "@f77-cpp-input", NULL},
+ {".fpp", "@f77-cpp-input", NULL},
+ {".FPP", "@f77-cpp-input", NULL},
{"@f77-cpp-input",
"tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\
- f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}"},
- {".r", "@ratfor"},
+ f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}",
+ NULL},
+ {".r", "@ratfor", NULL},
{"@ratfor",
"%{C:%{!E:%eGNU C does not support -C without using -E}}\
ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\
- f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}"},
- {".f", "@f77"},
- {".for", "@f77"},
- {".FOR", "@f77"},
+ f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}",
+ NULL},
+ {".f", "@f77", NULL},
+ {".for", "@f77", NULL},
+ {".FOR", "@f77", NULL},
{"@f77",
"%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\
- %{!fsyntax-only:%(invoke_as)}}}}"},
+ %{!fsyntax-only:%(invoke_as)}}}}", NULL},
/* XXX This is perverse and should not be necessary. */
{"@f77-version",
"tradcpp0 -lang-fortran %(cpp_options) %j \n\
@@ -56,4 +58,4 @@
%{!nostdlib:%{!nodefaultlibs:%G %L %G}} \
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} \
%{T*} \n\
- %g \n"},
+ %g \n", NULL},
--- gcc/java/lang-specs.h.orig Tue Oct 24 12:33:41 2000
+++ gcc/java/lang-specs.h Fri Mar 16 19:07:31 2001
@@ -25,14 +25,14 @@
/* This is the contribution to the `default_compilers' array in gcc.c for
Java. */
- {".java", "@java" },
- {".class", "@java" },
- {".zip", "@java" },
- {".jar", "@java" },
+ {".java", "@java", NULL},
+ {".class", "@java", NULL},
+ {".zip", "@java", NULL},
+ {".jar", "@java", NULL},
{"@java",
"%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\
%{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
%{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\
%{MD} %{MMD} %{M} %{MM} %{MA} %{MT*} %{MF*}\
- %{!fsyntax-only:%(invoke_as)}}"},
+ %{!fsyntax-only:%(invoke_as)}}", NULL},
--- gcc/objc/lang-specs.h.orig Tue Dec 5 17:53:06 2000
+++ gcc/objc/lang-specs.h Fri Mar 16 18:55:04 2001
@@ -21,7 +21,7 @@
/* This is the contribution to the `default_compilers' array in gcc.c for
objc. */
- {".m", "@objective-c"},
+ {".m", "@objective-c", NULL},
{"@objective-c",
/* cc1obj has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps or -traditional is given. */
@@ -36,8 +36,8 @@
cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\
%{!traditional:%{!ftraditional:%{!traditional-cpp:\
cc1obj %{ansi:-std=c89} %(cpp_options) %(cc1_options) %{gen-decls}}}}}\
- %{!fsyntax-only:%(invoke_as)}}}}"},
- {".mi", "@objc-cpp-output"},
+ %{!fsyntax-only:%(invoke_as)}}}}", NULL},
+ {".mi", "@objc-cpp-output", NULL},
{"@objc-cpp-output",
"%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{gen-decls}\
- %{!fsyntax-only:%(invoke_as)}}}}"},
+ %{!fsyntax-only:%(invoke_as)}}}}", NULL},
More information about the Gcc-patches
mailing list