Paul Eggert wrote:
>  # elif defined __clang__
>  #  undef gettext
> -#  define gettext(Msgid) ((const char *) (Msgid))
> +#  define gettext(Msgid) ((const char *) {(Msgid)})
>  #  undef dgettext
> -#  define dgettext(Domainname, Msgid) gettext (Msgid)
> +#  define dgettext(Domainname, Msgid) \
> +     ((void) (const char *) {(Domainname)}, gettext (Msgid))
>  #  undef dcgettext
> -#  define dcgettext(Domainname, Msgid, Category) dgettext (Domainname, Msgid)
> +#  define dcgettext(Domainname, Msgid, Category) \
> +     ((void) (int) {(Category)}, dgettext (Domainname, Msgid))

clang in C++ mode accepts the compound initializer syntax
  (TYPE) { VALUE... }
but — unlike gcc in C++ mode — requires that the values be constant
expressions.

As far as I can see, your patch will have the effect that
  gettext (some_function_that_returns_a_string ())
will produce a syntax error in C++ mode.

Am I correct?

Bruno




Reply via email to