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]

Re: [RFC] libgcov.c re-factoring and offline profile-tool


Thanks Joseph for these detailed comments/suggestions.
The fixed patch is attached to this email.
The only thing left out is the Texinfo manual. Do you mean this tool
should have its it's own texi file in gcc/doc?
I prefer to do the documentation later as I'm sure the final version
will from current one.

-Rong

On Wed, Nov 6, 2013 at 5:17 PM, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Wed, 6 Nov 2013, Rong Xu wrote:
>
>> In current implementation, if you use 'profile-tool help', it will
>> print out the usage and exit.
>
> Please make sure you follow the GNU Coding Standards.  Any installed tool
> needs to support --help, with output following the GNU Coding Standards,
> to standard output, with exit status 0 and with the output including the
> configured bug-reporting URL.  Any installed tool also needs to support
> --version, reporting the version number (with any configured package
> version) in the same format as other GCC tools, with copyright / licensing
> information.
>
> This is in addition to documenting the tool in the Texinfo manuals.
>
> You should also use the common GCC diagnostic functions rather than
> fprintf to stderr (and in any case make sure diagnostics follow the GNU
> Coding Standards for formatting - do not start with a capital letter or
> end with ".").
>
> All English messages need to be appropriately marked for translation.
> Look at the initialization in gcov.c including
>
>   gcc_init_libintl ();
>
>   diagnostic_initialize (global_dc, 0);
>
> and if you use standard diagnostic functions then translation is handled
> automatically; for random usage messages, fnotice may be helpful to avoid
> needing explicit _() markings.
>
> It is always wrong to include system headers before config.h, as config.h
> may define feature test macros that only work if defined before any system
> header is included.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com

Attachment: profile_tool_patch3.txt
Description: Text document


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