Commit f5896af2 by Zack Weinberg Committed by Zack Weinberg

gcc.c (C specs [!USE_CPPLIB]): Invoke tradcpp if any of -traditional,…

gcc.c (C specs [!USE_CPPLIB]): Invoke tradcpp if any of -traditional, -ftraditional, or -traditional-cpp was given.

	* gcc.c (C specs [!USE_CPPLIB]): Invoke tradcpp if any of
	-traditional, -ftraditional, or -traditional-cpp was given.
	Do not pass -traditional to the preprocessor.
	(.S spec): Likewise.  Don't bother defining __ASSEMBLER__, the
	preprocessor does it automatically.
	* objc/lang-specs.h: Likewise.  Don't bother defining __OBJC__.

	* ch/lang-specs.h: Always use tradcpp.  Do not pass
	-traditional, -trigraphs, or -pedantic to the preprocessor.
	* f/lang-specs.h (.F spec): Likewise.  Don't bother defining
	_LANGUAGE_FORTRAN.

From-SVN: r34995
parent 0080e892
2000-07-12 Zack Weinberg <zack@wolery.cumb.org>
* gcc.c (C specs [!USE_CPPLIB]): Invoke tradcpp if any of
-traditional, -ftraditional, or -traditional-cpp was given.
Do not pass -traditional to the preprocessor.
(.S spec): Likewise. Don't bother defining __ASSEMBLER__, the
preprocessor does it automatically.
* objc/lang-specs.h: Likewise. Don't bother defining __OBJC__.
* ch/lang-specs.h: Always use tradcpp. Do not pass
-traditional, -trigraphs, or -pedantic to the preprocessor.
* f/lang-specs.h (.F spec): Likewise. Don't bother defining
_LANGUAGE_FORTRAN.
2000-07-12 Zack Weinberg <zack@wolery.cumb.org>
* cppexp.c (LOGICAL): Delete macro.
(_cpp_parse_expr): Do not use UNARY for unary +. Implement ||
and && directly.
......
......@@ -24,13 +24,13 @@ Boston, MA 02111-1307, USA. */
{".ch", {"@chill"}},
{".chi", {"@chill"}},
{"@chill",
{"cpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
{"tradcpp -lang-chill %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU CHILL does not support -C without using -E}}\
%{!no-gcc:-D__GNUCHILL__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional} %{!undef:%{!ansi:%p} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:-D__OPTIMIZE__} \
%{!undef:%{!ansi:%p} %P} \
%{fshow-column} %{fno-show-column}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%{g*} %{W*} %{w} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%i %{!E:%g.i}%{E:%W{o*}} \n",
"%{!E:cc1chill %g.i %1 \
%{!Q:-quiet} -dumpbase %b.ch %{d*} %{m*} %{a}\
......
......@@ -35,15 +35,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
Sun f77, at least) so you test `__unix' rather than `unix'.
-D_LANGUAGE_FORTRAN is used by some compilers like SGI and
might as well be in there. */
{"cpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
{"tradcpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
%{!undef:%P} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} \
%{ffast-math:-D__FAST_MATH__}\
%{fshow-column} %{fno-show-column}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
%i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
"%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} %1 %(f771) \
......@@ -86,7 +84,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"}},
{"@f77-version",
{"cpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
{"tradcpp -lang-fortran %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I \
%{C:%{!E:%eGNU C does not support -C without using -E}} \
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} \
......
......@@ -660,7 +660,8 @@ static struct compiler default_compilers[] =
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"
#else /* ! USE_CPPLIB */
"cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
"%{traditional|ftraditional|traditional-cpp:trad}cpp -lang-c \
%{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
......@@ -669,8 +670,6 @@ static struct compiler default_compilers[] =
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\
%{fshow-column} %{fno-show-column}\
%{fleading-underscore} %{fno-leading-underscore}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......@@ -689,7 +688,8 @@ static struct compiler default_compilers[] =
#endif /* ! USE_CPPLIB */
}},
{"-",
{"%{E:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
{"%{E:%{traditional|ftraditional|traditional-cpp:trad}cpp \
-lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
......@@ -698,8 +698,6 @@ static struct compiler default_compilers[] =
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\
%{fshow-column} %{fno-show-column}\
%{fleading-underscore} %{fno-leading-underscore}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......@@ -708,7 +706,8 @@ static struct compiler default_compilers[] =
{".h", {"@c-header"}},
{"@c-header",
{"%{!E:%eCompilation of header file requested} \
cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{traditional|ftraditional|traditional-cpp:trad}cpp \
%{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
......@@ -717,8 +716,6 @@ static struct compiler default_compilers[] =
%{ffast-math:-D__FAST_MATH__}\
%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\
%{fshow-column} %{fno-show-column}\
%{fleading-underscore} %{fno-leading-underscore}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......@@ -741,15 +738,14 @@ static struct compiler default_compilers[] =
%i %A\n }}}}"}},
{".S", {"@assembler-with-cpp"}},
{"@assembler-with-cpp",
{"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
{"%{traditional|ftraditional|traditional-cpp:trad}cpp -lang-asm \
%{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\
-$ %{!undef:%p %P} -D__ASSEMBLER__ \
-$ %{!undef:%p %P} \
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
%{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
%{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\
%{fshow-column} %{fno-show-column}\
%{fleading-underscore} %{fno-leading-underscore}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......
......@@ -57,17 +57,16 @@ Boston, MA 02111-1307, USA. */
%{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
%{!pipe:%g.s} %A\n }}}}"}
#else /* ! USE_CPPLIB */
{"cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
{"%{traditional|ftraditional|traditional-cpp:trad}cpp -lang-objc \
%{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-D__OBJC__ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 \
-D__GNUC_PATCHLEVEL__=%v3}\
%{ansi:-trigraphs -D__STRICT_ANSI__}\
%{ansi:-trigraphs -D__STRICT_ANSI__}\
%{!undef:%{!ansi:%p} %P} %{trigraphs}\
%c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{ffast-math:-D__FAST_MATH__}\
%{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\
%{fleading-underscore} %{fno-leading-underscore}\
%{fshow-column} %{fno-show-column}\
%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
......
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