This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] include macro name in "ISO C99 requires rest arguments to be used"
- From: Roland McGrath <roland at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 28 Jul 2010 14:20:14 -0700 (PDT)
- Subject: [PATCH] include macro name in "ISO C99 requires rest arguments to be used"
The libcpp -pedantic warning "ISO C99 requires rest arguments to be used"
does not say which macro it refers to, which can make it harder than
necessary to navigate a deep nest of macros to find the problem.
Include the macro name in the error message.
Thanks,
Roland
libcpp/
2010-07-28 Roland McGrath <roland@redhat.com>
* macro.c (_cpp_arguments_ok): Include macro name in -pedantic warning.
diff --git a/libcpp/macro.c b/libcpp/macro.c
index 31de415..0000000 100644
--- a/libcpp/macro.c
+++ b/libcpp/macro.c
@@ -562,7 +562,8 @@ _cpp_arguments_ok (cpp_reader *pfile, cp
{
if (CPP_PEDANTIC (pfile) && ! macro->syshdr)
cpp_error (pfile, CPP_DL_PEDWARN,
- "ISO C99 requires rest arguments to be used");
+ "macro %s: ISO C99 requires rest arguments to be used",
+ NODE_NAME (node));
return true;
}