[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gettext] [bug #43970] Incorrect "warning: unterminated string liter
From: |
Vaclav Slavik |
Subject: |
[bug-gettext] [bug #43970] Incorrect "warning: unterminated string literal" for some C++11 raw strings |
Date: |
Sun, 11 Jan 2015 17:39:46 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 |
Follow-up Comment #2, bug #43970 (project gettext):
> (e.g. LR is defined as an ordinary C identifier).
I'm not sure I follow - how could that possibly be valid C or pre-11 C++ code?
I think the syntax is intentionally such that it cannot be misinterpreted as
valid C.
> Perhaps we should add a new language tag, like xgettext -L C++11, to toggle
this feature.
IMNSHO that would be a mistake, for two reasons:
1) C++11 *is* (modern) C++ and there will be more and more of it (and C++14
and C++17...). It doesn't make much sense to treat the current thing specially
and worse, make it non-default.
2) It would break extension-based detection of the language and make using
xgettext with the current/default version of C++ harder. That includes tools
on top of xgettext (e.g., selfishly, Poedit) that would have no reasonable way
of detecting C++11 use and would have to require user configuration for things
that should "just work".
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?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43970>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/