aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorEric Gallager <egall@gwmail.gwu.edu>2017-11-21 00:57:29 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2017-11-21 00:57:29 +0000
commit34b81eb96cd1df28d7f878bc1f3df607746507da (patch)
tree89c38d8dcd983f269e08bc431d273c64986a220b /libcpp
parent26edace69b6b909eebddcf18c8844bb4c94d9a35 (diff)
downloadgcc-34b81eb96cd1df28d7f878bc1f3df607746507da.zip
gcc-34b81eb96cd1df28d7f878bc1f3df607746507da.tar.gz
gcc-34b81eb96cd1df28d7f878bc1f3df607746507da.tar.bz2
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
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/macro.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index cc5d4d3..556373e 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -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
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 43f2baa..791817a 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -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;