]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Support 'p'/'P' exponent markers in number tokens also in C.
authorBruno Haible <bruno@clisp.org>
Sun, 7 Jan 2018 02:20:06 +0000 (03:20 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 7 Jan 2018 02:20:06 +0000 (03:20 +0100)
* gettext-tools/src/x-c.c (phase5_get): Recognize sign after 'p' or 'P' also
in C.
* NEWS: Update.

NEWS
gettext-tools/src/x-c.c

diff --git a/NEWS b/NEWS
index bdfb2689e4980cbc21c4f98000a4662a3a5378c8..57933c35de7d7cf3a1b6c6e11a41935b7598e5a9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,12 @@
   - update-po target in Makefile.in.in now uses msgfmt --previous.
 
 * Programming languages support:
+  - C, C++:
+    xgettext now supports 'p'/'P' exponent markers in number tokens, as
+    specified in C99 and C++17.
   - C++:
-    xgettext now supports single-quotes and 'p'/'P' exponent markers in
-    number tokens, as specified in C++14 and C++17, respectively.
+    xgettext now supports single-quotes in number tokens, as specified in
+    C++14.
   - Java:
     xgettext now supports UTF-8 encoded .properties files (a new feature
     of Java 9).
index 8debf01cf913104703e293bd85b2b37a695b22a2..3dd25499a7dd129ca4efb6546a19d6ceff616c41 100644 (file)
@@ -1404,9 +1404,8 @@ phase5_get (token_ty *tp)
             {
             case 'p':
             case 'P':
-              if (!cxx_extensions)
-                continue;
-              /* In C++17, 'p' and 'P' can be used as an exponent marker.  */
+              /* In C99 and C++17, 'p' and 'P' can be used as an exponent
+                 marker.  */
               /* FALLTHROUGH */
             case 'e':
             case 'E':