Commit f7143427 by Zack Weinberg Committed by Zack Weinberg

gcc.c, [...]: Add zero initializer for cpp_spec field to all array elements.

	* gcc.c, cp/lang-specs.h, f/lang-specs.h, java/lang-specs.h,
	objc/lang-specs.h: Add zero initializer for cpp_spec field to
	all array elements.
	* cp/lang-specs.h: Don't put an #ifdef inside the initializer
	list; set a default for CPLUSPLUS_CPP_SPEC and use it.

From-SVN: r40173
parent cb773845
2001-03-01 Zack Weinberg <zackw@stanford.edu> 2001-03-01 Zack Weinberg <zackw@stanford.edu>
* gcc.c, objc/lang-specs.h: Add zero initializer for cpp_spec
field to all array elements.
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* cpphash.h (struct cpp_reader): Add print_version field. * cpphash.h (struct cpp_reader): Add print_version field.
* cppinit.c (cpp_handle_option): For -v, -version, and --version, * cppinit.c (cpp_handle_option): For -v, -version, and --version,
just set print_version and other flags as appropriate. just set print_version and other flags as appropriate.
......
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* lang-specs.h: Add zero initializer for cpp_spec field to
all array elements that need one. Don't put an #ifdef inside
the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
use it.
2001-03-01 Nathan Sidwell <nathan@codesourcery.com> 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
Implement using decls inside template functions. Implement using decls inside template functions.
......
...@@ -22,12 +22,16 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,12 +22,16 @@ Boston, MA 02111-1307, USA. */
/* This is the contribution to the `default_compilers' array in gcc.c for /* This is the contribution to the `default_compilers' array in gcc.c for
g++. */ g++. */
{".cc", "@c++"}, #ifndef CPLUSPLUS_CPP_SPEC
{".cp", "@c++"}, #define CPLUSPLUS_CPP_SPEC 0
{".cxx", "@c++"}, #endif
{".cpp", "@c++"},
{".c++", "@c++"}, {".cc", "@c++", 0},
{".C", "@c++"}, {".cp", "@c++", 0},
{".cxx", "@c++", 0},
{".cpp", "@c++", 0},
{".c++", "@c++", 0},
{".C", "@c++", 0},
{"@c++", {"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke /* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */ the external preprocessor if -save-temps is given. */
...@@ -50,13 +54,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -50,13 +54,10 @@ Boston, MA 02111-1307, USA. */
%{ansi:-D__STRICT_ANSI__}}\ %{ansi:-D__STRICT_ANSI__}}\
%{ansi:-trigraphs -$}\ %{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e1*}\ %(cc1_options) %2 %{+e1*}\
%{!fsyntax-only:%(invoke_as)}}}}" %{!fsyntax-only:%(invoke_as)}}}}",
#ifdef CPLUSPLUS_CPP_SPEC CPLUSPLUS_CPP_SPEC},
, CPLUSPLUS_CPP_SPEC {".ii", "@c++-cpp-output", 0},
#endif
},
{".ii", "@c++-cpp-output"},
{"@c++-cpp-output", {"@c++-cpp-output",
"%{!M:%{!MM:%{!E:\ "%{!M:%{!MM:%{!E:\
cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* lang-specs.h: Add zero initializer for cpp_spec field to all
array elements.
2001-02-24 Zack Weinberg <zackw@stanford.edu> 2001-02-24 Zack Weinberg <zackw@stanford.edu>
* com.c: Don't define STDC_HEADERS, autoconf handles it. * com.c: Don't define STDC_HEADERS, autoconf handles it.
......
...@@ -24,23 +24,23 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -24,23 +24,23 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* This is the contribution to the `default_compilers' array in gcc.c for /* This is the contribution to the `default_compilers' array in gcc.c for
g77. */ g77. */
{".F", "@f77-cpp-input"}, {".F", "@f77-cpp-input", 0},
{".fpp", "@f77-cpp-input"}, {".fpp", "@f77-cpp-input", 0},
{".FPP", "@f77-cpp-input"}, {".FPP", "@f77-cpp-input", 0},
{"@f77-cpp-input", {"@f77-cpp-input",
"tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\ "tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f |\n\
f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}"}, f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}}", 0},
{".r", "@ratfor"}, {".r", "@ratfor", 0},
{"@ratfor", {"@ratfor",
"%{C:%{!E:%eGNU C does not support -C without using -E}}\ "%{C:%{!E:%eGNU C does not support -C without using -E}}\
ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\ ratfor %{C} %{v} %i %{E:%W{o*}} %{!E: %{!pipe:-o %g.f} |\n\
f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}"}, f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}", 0},
{".f", "@f77"}, {".f", "@f77", 0},
{".for", "@f77"}, {".for", "@f77", 0},
{".FOR", "@f77"}, {".FOR", "@f77", 0},
{"@f77", {"@f77",
"%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\ "%{!M:%{!MM:%{!E:f771 %i %(cc1_options) %{I*}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
/* XXX This is perverse and should not be necessary. */ /* XXX This is perverse and should not be necessary. */
{"@f77-version", {"@f77-version",
"tradcpp0 -lang-fortran %(cpp_options) %j \n\ "tradcpp0 -lang-fortran %(cpp_options) %j \n\
...@@ -56,4 +56,4 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -56,4 +56,4 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
%{!nostdlib:%{!nodefaultlibs:%G %L %G}} \ %{!nostdlib:%{!nodefaultlibs:%G %L %G}} \
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} \ %{!A:%{!nostdlib:%{!nostartfiles:%E}}} \
%{T*} \n\ %{T*} \n\
%g \n"}, %g \n", 0},
...@@ -766,19 +766,20 @@ static struct compiler default_compilers[] = ...@@ -766,19 +766,20 @@ static struct compiler default_compilers[] =
were not present when we built the driver, we will hit these copies 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 and be given a more meaningful error than "file not used since
linking is not done". */ linking is not done". */
{".m", "#Objective-C"}, {".mi", "#Objective-C"}, {".m", "#Objective-C", 0}, {".mi", "#Objective-C", 0},
{".cc", "#C++"}, {".cxx", "#C++"}, {".cpp", "#C++"}, {".cp", "#C++"}, {".cc", "#C++", 0}, {".cxx", "#C++", 0}, {".cpp", "#C++", 0},
{".c++", "#C++"}, {".C", "#C++"}, {".ii", "#C++"}, {".cp", "#C++", 0}, {".c++", "#C++", 0}, {".C", "#C++", 0},
{".ads", "#Ada"}, {".adb", "#Ada"}, {".ada", "#Ada"}, {".ii", "#C++", 0},
{".f", "#Fortran"}, {".for", "#Fortran"}, {".fpp", "#Fortran"}, {".ads", "#Ada", 0}, {".adb", "#Ada", 0}, {".ada", "#Ada", 0},
{".F", "#Fortran"}, {".FOR", "#Fortran"}, {".FPP", "#Fortran"}, {".f", "#Fortran", 0}, {".for", "#Fortran", 0}, {".fpp", "#Fortran", 0},
{".r", "#Ratfor"}, {".F", "#Fortran", 0}, {".FOR", "#Fortran", 0}, {".FPP", "#Fortran", 0},
{".p", "#Pascal"}, {".pas", "#Pascal"}, {".r", "#Ratfor", 0},
{".ch", "#Chill"}, {".chi", "#Chill"}, {".p", "#Pascal", 0}, {".pas", "#Pascal", 0},
{".java", "#Java"}, {".class", "#Java"}, {".ch", "#Chill", 0}, {".chi", "#Chill", 0},
{".zip", "#Java"}, {".jar", "#Java"}, {".java", "#Java", 0}, {".class", "#Java", 0},
{".zip", "#Java", 0}, {".jar", "#Java", 0},
/* Next come the entries for C. */ /* Next come the entries for C. */
{".c", "@c"}, {".c", "@c", 0},
{"@c", {"@c",
/* cc1 has an integrated ISO C preprocessor. We should invoke the /* cc1 has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps or -traditional is given. */ external preprocessor if -save-temps or -traditional is given. */
...@@ -793,27 +794,27 @@ static struct compiler default_compilers[] = ...@@ -793,27 +794,27 @@ static struct compiler default_compilers[] =
cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}\ cc1 -fpreprocessed %{!pipe:%g.i} %(cc1_options)}\
%{!traditional:%{!ftraditional:%{!traditional-cpp:\ %{!traditional:%{!ftraditional:%{!traditional-cpp:\
cc1 -lang-c %{ansi:-std=c89} %(cpp_options) %(cc1_options)}}}}\ cc1 -lang-c %{ansi:-std=c89} %(cpp_options) %(cc1_options)}}}}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
{"-", {"-",
"%{!E:%e-E required when input is from standard input}\ "%{!E:%e-E required when input is from standard input}\
%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"}, %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", 0},
{".h", "@c-header"}, {".h", "@c-header", 0},
{"@c-header", {"@c-header",
"%{!E:%eCompilation of header file requested} \ "%{!E:%eCompilation of header file requested} \
%(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)"}, %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", 0},
{".i", "@cpp-output"}, {".i", "@cpp-output", 0},
{"@cpp-output", {"@cpp-output",
"%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}"}, "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0},
{".s", "@assembler"}, {".s", "@assembler", 0},
{"@assembler", {"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}"}, "%{!M:%{!MM:%{!E:%{!S:as %(asm_options) %i %A }}}}", 0},
{".S", "@assembler-with-cpp"}, {".S", "@assembler-with-cpp", 0},
{"@assembler-with-cpp", {"@assembler-with-cpp",
"%(trad_capable_cpp) -lang-asm %(cpp_options)\ "%(trad_capable_cpp) -lang-asm %(cpp_options)\
%{!M:%{!MM:%{!E:%(invoke_as)}}}"}, %{!M:%{!MM:%{!E:%(invoke_as)}}}", 0},
#include "specs.h" #include "specs.h"
/* Mark end of table */ /* Mark end of table */
{0, 0} {0, 0, 0}
}; };
/* Number of elements in default_compilers, not counting the terminator. */ /* Number of elements in default_compilers, not counting the terminator. */
......
2001-03-01 Zack Weinberg <zackw@stanford.edu>
* lang-specs.h: Add zero initializer for cpp_spec field to all
array elements.
2001-02-16 Per Bothner <per@bothner.com> 2001-02-16 Per Bothner <per@bothner.com>
Handle compiling multiple input files at once, and @FILE syntax. Handle compiling multiple input files at once, and @FILE syntax.
......
...@@ -25,14 +25,14 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ ...@@ -25,14 +25,14 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
/* This is the contribution to the `default_compilers' array in gcc.c for /* This is the contribution to the `default_compilers' array in gcc.c for
Java. */ Java. */
{".java", "@java" }, {".java", "@java" , 0},
{".class", "@java" }, {".class", "@java" , 0},
{".zip", "@java" }, {".zip", "@java" , 0},
{".jar", "@java" }, {".jar", "@java" , 0},
{"@java", {"@java",
"%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\ "%{fjni:%{femit-class-files:%e-fjni and -femit-class-files are incompatible}}\
%{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\ %{fjni:%{femit-class-file:%e-fjni and -femit-class-file are incompatible}}\
%{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\ %{!E:jc1 %i %(jc1) %(cc1_options) %{+e*} %{I*}\
%{MD} %{MMD} %{M} %{MM} %{MA} %{MT*} %{MF*}\ %{MD} %{MMD} %{M} %{MM} %{MA} %{MT*} %{MF*}\
%{!fsyntax-only:%(invoke_as)}}"}, %{!fsyntax-only:%(invoke_as)}}", 0},
...@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. */
/* This is the contribution to the `default_compilers' array in gcc.c for /* This is the contribution to the `default_compilers' array in gcc.c for
objc. */ objc. */
{".m", "@objective-c"}, {".m", "@objective-c", 0},
{"@objective-c", {"@objective-c",
/* cc1obj has an integrated ISO C preprocessor. We should invoke the /* cc1obj has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps or -traditional is given. */ external preprocessor if -save-temps or -traditional is given. */
...@@ -36,8 +36,8 @@ Boston, MA 02111-1307, USA. */ ...@@ -36,8 +36,8 @@ Boston, MA 02111-1307, USA. */
cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\ cc1obj -fpreprocessed %{!pipe:%g.mi} %(cc1_options) %{gen-decls}}\
%{!traditional:%{!ftraditional:%{!traditional-cpp:\ %{!traditional:%{!ftraditional:%{!traditional-cpp:\
cc1obj %{ansi:-std=c89} %(cpp_options) %(cc1_options) %{gen-decls}}}}}\ cc1obj %{ansi:-std=c89} %(cpp_options) %(cc1_options) %{gen-decls}}}}}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
{".mi", "@objc-cpp-output"}, {".mi", "@objc-cpp-output", 0},
{"@objc-cpp-output", {"@objc-cpp-output",
"%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{gen-decls}\ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{gen-decls}\
%{!fsyntax-only:%(invoke_as)}}}}"}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment