Commit 740ca4b2 by Joseph Myers Committed by Joseph Myers

re PR c/18502 (trigraphs don't work with -std=gnu99)

	PR c/18502
	* gcc.c (cpp_unique_options): Remove %{trigraphs}.
	(cpp_options, cc1_options): Change %{std*&ansi} to
	%{std*&ansi&trigraphs}.

testsuite:
	* gcc.dg/pr18502-1.c: New test.

From-SVN: r94632
parent a52aff23
2005-02-02 Joseph S. Myers <joseph@codesourcery.com>
PR c/18502
* gcc.c (cpp_unique_options): Remove %{trigraphs}.
(cpp_options, cc1_options): Change %{std*&ansi} to
%{std*&ansi&trigraphs}.
2005-02-02 Kazu Hirata <kazu@cs.umass.edu> 2005-02-02 Kazu Hirata <kazu@cs.umass.edu>
* cse.c: Update comments. * cse.c: Update comments.
......
...@@ -773,7 +773,7 @@ static const char *cpp_unique_options = ...@@ -773,7 +773,7 @@ static const char *cpp_unique_options =
%{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\ %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\ %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
%{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\ %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
%{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\ %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i\
%{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
%{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
%{E|M|MM:%W{o*}}"; %{E|M|MM:%W{o*}}";
...@@ -784,9 +784,9 @@ static const char *cpp_unique_options = ...@@ -784,9 +784,9 @@ static const char *cpp_unique_options =
options used to set target flags. Those special target flags settings may options used to set target flags. Those special target flags settings may
in turn cause preprocessor symbols to be defined specially. */ in turn cause preprocessor symbols to be defined specially. */
static const char *cpp_options = static const char *cpp_options =
"%(cpp_unique_options) %1 %{m*} %{std*&ansi} %{W*&pedantic*} %{w} %{f*}\ "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
%{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}\ %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*}\
%{save-temps:-fpch-preprocess}"; %{undef} %{save-temps:-fpch-preprocess}";
/* This contains cpp options which are not passed when the preprocessor /* This contains cpp options which are not passed when the preprocessor
output will be used by another program. */ output will be used by another program. */
...@@ -797,7 +797,7 @@ static const char *cc1_options = ...@@ -797,7 +797,7 @@ static const char *cc1_options =
"%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\ %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\ %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
%{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi}\ %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
%{v:-version} %{pg:-p} %{p} %{f*} %{undef}\ %{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
%{Qn:-fno-ident} %{--help:--help}\ %{Qn:-fno-ident} %{--help:--help}\
%{--target-help:--target-help}\ %{--target-help:--target-help}\
......
2005-02-02 Joseph S. Myers <joseph@codesourcery.com>
PR c/18502
* gcc.dg/pr18502-1.c: New test.
2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/17413 PR c++/17413
......
/* Test that -trigraphs isn't reordered before -std=gnu99. Bug
18502. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -trigraphs" } */
int a??(2??);
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