bugGNU gettext - Bugs: bug #50117, bogus "unterminated character...


You are not allowed to post comments on this tracker with your current authentication level.

bug #50117: bogus "unterminated character constant" warning with C++14 single-quotation-mark as digit separators

Submitted by:  Moritz Bunkus <mbunkus>
Submitted on:  Sun 22 Jan 2017 11:03:34 AM UTC  
Category: CSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Fri 28 Jul 2017 01:45:48 AM UTC, comment #1:

I've created a patch to support this, and tested it on MAME, which makes fairly heavy use of C++14 digit grouping. I'm attaching it as a git changeset.

(file #41365)

Vas Crabb <cuavas>
Sun 22 Jan 2017 11:03:34 AM UTC, original submission:

xgettext doesn't support C++14's "Single-quotation-mark as a digit separator" feature[1] properly. It'll issue a warning about an "unterminated character constant" with the following trivial program:

int main() {
auto i = 1'234;
return 0;

Invoke xgettext:

[0 mosu@sweet-chili ~/test] xgettext -o test.pot test2.cpp
test2.cpp:2: warning: unterminated character constant

If you want to verify that this is an actually valid C++14 program:

[0 mosu@sweet-chili ~/test] g++ -std=c++14 -o test2 test2.cpp
[0 mosu@sweet-chili ~/test]

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3781.pdf

Moritz Bunkus <mbunkus>


Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cuavas (Updated the item)
  • -unavailable- added by mbunkus (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Jul 2017 01:45:48 AM UTCcuavasAttached File-=>Added 0001-Recognise-C-14-digit-grouping-with-character.patch, #41365

    Back to the top

    Powered by Savane 3.1-cleanup1