bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] [bug #43970] Incorrect "warning: unterminated string liter


From: Daiki Ueno
Subject: [bug-gettext] [bug #43970] Incorrect "warning: unterminated string literal" for some C++11 raw strings
Date: Sun, 11 Jan 2015 22:43:28 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.3.0

Follow-up Comment #3, bug #43970 (project gettext):

Consider the following code:

++++
#include <stdio.h>
#define R "foo"
void foo (void) { printf ("%s\n", gettext (R"aaa(\u3042")); }
int main (void) { foo (); return 0; }
----

This is a valid pre-11 code which passes a string "fooaaa(あ" to gettext, but
invalid as C++11.  If xgettext treated the code as C++11, it couldn't detect
the error until EOF is read.

> Wouldn't it be better to loosen the warning instead? As far as I can tell,
it isn't causing any harm in this case - gettext-wrapped strings following
after such raw strings are still recognized by xgettext correctly, so it
doesn't seem to break the parser?

Yes, if that is possible, it would be a desired behavior.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43970>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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