This is the mail archive of the gcc-help@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]

Re: How to dump all the warning/error messages list from gcc compiler?


Excuse me for the mis-operation. It is the first time to ask question here.
When I said a unique id corresponding to a warning message, I actually
refer to some other compiler,  like intel compiler.
The warning/remark reported in compiling by using intel compiler has a
corresponding id (a number) for that message.


For GCC, I am now trying to use -fdiagnostics-show-option to show the
diagnostics which can be used to disable that kind of warning message.
I mean I can use Wunused-parameter as unique "id" (not necessarily a number)
for the following kind of message.
main.cpp:7: warning: unused parameter ‘argc’ [-Wunused-parameter]


I assume that each warning message by GCC can be turned off its
corresponding unique diagnostics, and so uniquely identified by that
diagnostics.
Do you agree with this?

2012/11/18 Ian Lance Taylor <iant@google.com>:
> On Fri, Nov 16, 2012 at 5:33 PM, Xiaopi Liu <liuxiaopi349@gmail.com> wrote:
>> okay. Thanks.
>> Then how can we dump the id with that unique warning message in compiling?
>>
>> I want to do statistics how many kinds of warning message being
>> reported and reported how many times for each warning.
>
>
> Please reply to the mailing list, not just to me.  Thanks.
>
> I don't know what you mean by "the id with that unique warning
> message."  Are you talking about something that you think exists
> today?  Or are you talking about something that you think ought to
> exist?  Because as far as I know, there is no such unique id.
>
> Ian



-- 


Best wishes!
Sincerely yours, Xiaopi LIU


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