sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: untranslatable error string in compile.c


From: Jim Meyering
Subject: Re: untranslatable error string in compile.c
Date: Sun, 5 Jun 2016 21:55:38 -0700

On Sun, Jun 5, 2016 at 7:52 PM, Assaf Gordon <address@hidden> wrote:
> Hello,
>
>> On Jun 4, 2016, at 00:54, Jim Meyering <address@hidden> wrote:
>>
>> On Fri, Jun 3, 2016 at 7:02 PM, Assaf Gordon <address@hidden> wrote:
>>>
>>> Commit 854b64 [1] (which I suggested about a year ago) had an unintended 
>>> effect:
>>>
>>> It makes the last error message untranslatable, because nowhere is it 
>>> passed to gettext's N_() macro.
>> Glad you caught that before release.
>> Your fix looks fine.
>
> Attached updated (capitalized) patch, but sadly it's not yet OK:
>
> Now I recall the reason I suggested to comment these out in the commit last 
> year was to avoid gcc's -Wunused-macro (which is only triggered when building 
> under gcc form git, which I missed now since I was building with clang).
>
> If we uncomment the macro then under gcc with --enable-gcc-warnings the error 
> returns:
> ==
> compile.c:188:0: error: macro "END_ERRORS" is not used [-Werror=unused-macros]
>  #define END_ERRORS (COLON_LACKS_LABEL \

Good point.
It might be better just to add something like this near the top of
that one file:

  #if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
  # pragma GCC diagnostic ignored "-Wunused-macros"
  #endif

Caveat: I doubt that #if guard is appropriate for gcc's #pragma GCC
with -Wunused-macros (I copied that from coreutils/src/test.c where it
guarded a different, newer option). A simple #ifdef __GNUC__ may be
enough, these days.

> It seems "-Wunused-macro" should've been disabled in configure.ac:309,

That disabling is solely for lib/ (aka gnulib).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]