This is the mail archive of the gcc@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: -Wall and all that


jsm28@cam.ac.uk (Joseph S. Myers)  wrote on 16.03.02 in <Pine.LNX.4.33.0203162333530.19686-100000@kern.srcf.societies.cam.ac.uk>:

> On 17 Mar 2002, Kai Henningsen wrote:
>
> > 1. Define an identifier for each warning message. You could, of course,
> > use the full text, but that'd be awkward to handle. Maybe something based
> > on the relevant -Wxxx option would be sensible; commercial vendors seem to
> > usually just use a number. Display this identifier which each warning
> > message. (This might also be useful for the test suite. It's certainly
> > useful with I18N.)
>
> This idea was extensively discussed in September 1998; there was even a
> patch by Mark Mitchell that was checked in for less than a day.  Reading
> the previous discussion from egcs and egcs-patches is recommended.  There
> was no consensus support for message identifiers.  gettext works fine for
> i18n.

You obviously misunderstood the reference. I didn't mean using the  
identifier to locate the message (I didn't even think of that), but if you  
get a user report quoting error messages in chinese (say), those  
identifiers would still enable you to understand what it's all about  
without first asking for a translation.

> > 4. Have pragmas to turn them on and off locally, say _Pragma("GCC warn yyy
> > on") and _Pragma("GCC warn yyy off").
>
> This can be done gettext-style, by giving a regexp or substring to match
> against the untranslated version of the message (which needs some changes
> to make the untranslated version of the whole message be available at any
> point, but is less invasive than solutions involving unique identifiers).

And the user then needs to know the untranslated version. This is *not*  
user friendly.

MfG Kai


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