Use -Wtraditional for "would be stringified in traditional C" (PR preprocessor/81794)

libcpp/ChangeLog:

2017-03-24  Eric Gallager  <egall@gwmail.gwu.edu>

	PR preprocessor/81794
	* macro.c (check_trad_stringification): Have warning be controlled
	by -Wtraditional.

gcc/testsuite/ChangeLog:

2017-09-17  Eric Gallager  <egall@gwmail.gwu.edu>

	PR preprocessor/81794
	* gcc.dg/pragma-diag-7.c: Update to include check for
	stringification.

From-SVN: r254981
This commit is contained in:
Eric Gallager
2017-11-21 00:57:29 +00:00
committed by David Malcolm
parent 26edace69b
commit 34b81eb96c
4 changed files with 26 additions and 1 deletions
+6
View File
@@ -1,3 +1,9 @@
2017-11-20 Eric Gallager <egall@gwmail.gwu.edu>
PR preprocessor/81794
* macro.c (check_trad_stringification): Have warning be controlled
by -Wtraditional.
2017-11-20 David Malcolm <dmalcolm@redhat.com>
PR c++/72786
+1 -1
View File
@@ -3490,7 +3490,7 @@ check_trad_stringification (cpp_reader *pfile, const cpp_macro *macro,
if (NODE_LEN (node) == len
&& !memcmp (p, NODE_NAME (node), len))
{
cpp_error (pfile, CPP_DL_WARNING,
cpp_warning (pfile, CPP_W_TRADITIONAL,
"macro argument \"%s\" would be stringified in traditional C",
NODE_NAME (node));
break;