Message ID | 20100728212014.1E5D9400DE@magilla.sf.frob.com |
---|---|
State | New |
Headers | show |
>>>>> "Roland" == Roland McGrath <roland@redhat.com> writes:
Roland> The libcpp -pedantic warning "ISO C99 requires rest arguments to
Roland> be used" does not say which macro it refers to, which can make
Roland> it harder than necessary to navigate a deep nest of macros to
Roland> find the problem. Include the macro name in the error message.
I didn't see a reply to this.
Sorry for the delay on this, it got buried.
Roland> 2010-07-28 Roland McGrath <roland@redhat.com>
Roland> * macro.c (_cpp_arguments_ok): Include macro name in -pedantic warning.
This is ok. You didn't mention whether you regtested it, but I assume so.
If not, and it needs test suite fixes, those are ok too.
Tom
> This is ok. You didn't mention whether you regtested it, but I assume so. > If not, and it needs test suite fixes, those are ok too. I did not. It was a suggestion for actual GCC hackers, of which one I am not. I have never had GCC commit access, and I don't really know the testing expectations and so forth. I just thought since I thought of a possible patch while trying to figure out what switch I was supposed to be using, it was nicer to post that rather than just a bug report. Thanks, Roland
>>>>> "Roland" == Roland McGrath <roland@redhat.com> writes: >> This is ok. You didn't mention whether you regtested it, but I assume so. >> If not, and it needs test suite fixes, those are ok too. Roland> I did not. It was a suggestion for actual GCC hackers, of which Roland> one I am not. I have never had GCC commit access, and I don't Roland> really know the testing expectations and so forth. I just Roland> thought since I thought of a possible patch while trying to Roland> figure out what switch I was supposed to be using, it was nicer Roland> to post that rather than just a bug report. Ok. I will try to get to it. Tom
> >>>>> "Roland" == Roland McGrath <roland@redhat.com> writes: > > >> This is ok. You didn't mention whether you regtested it, but I assume so. > >> If not, and it needs test suite fixes, those are ok too. > > Roland> I did not. It was a suggestion for actual GCC hackers, of which > Roland> one I am not. I have never had GCC commit access, and I don't > Roland> really know the testing expectations and so forth. I just > Roland> thought since I thought of a possible patch while trying to > Roland> figure out what switch I was supposed to be using, it was nicer > Roland> to post that rather than just a bug report. > > Ok. I will try to get to it. Thanks. FWIW, there is nothing depending on this. So without synthetic test cases, it might not be noticed again any time soon. Thanks, Roland
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; }