This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
 	}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]