]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Fix misrecognition of character literals in C and Vala
authorDaiki Ueno <ueno@gnu.org>
Sat, 7 Jun 2014 01:35:14 +0000 (10:35 +0900)
committerDaiki Ueno <ueno@gnu.org>
Sat, 7 Jun 2014 01:35:14 +0000 (10:35 +0900)
Problem reported by Paul Eggert at
<http://lists.gnu.org/archive/html/bug-gettext/2014-06/msg00015.html>.
* x-c.c (phase5_get): Make sure to skip contents of character constant.
* x-vala.c (phase3_get): Likewise.

gettext-tools/src/ChangeLog
gettext-tools/src/x-c.c
gettext-tools/src/x-vala.c

index b766d30a7a4583b770eeda74823c78102c739525..f492e00765151021808c67cf7d7a7b9edd42703e 100644 (file)
@@ -1,3 +1,11 @@
+2014-06-07  Daiki Ueno  <ueno@gnu.org>
+
+       xgettext: Fix misrecognition of character literals in C and Vala
+       Problem reported by Paul Eggert at
+       <http://lists.gnu.org/archive/html/bug-gettext/2014-06/msg00015.html>.
+       * x-c.c (phase5_get): Make sure to skip contents of character constant.
+       * x-vala.c (phase3_get): Likewise.
+
 2014-06-03  Daiki Ueno  <ueno@gnu.org>
 
        desktop: Use logical filename as msgid location
index 2ae2f3c9eeeba9c7d80534f810ac0fd9841c0412..203eb796f1e57b9734779475ca89f09b93914665 100644 (file)
@@ -1288,6 +1288,8 @@ phase5_get (token_ty *tp)
             {
             case '\\':
               last_was_backslash = true;
+              /* FALLTHROUGH */
+            default:
               continue;
             case '\n':
               error_with_progname = false;
@@ -1299,7 +1301,7 @@ phase5_get (token_ty *tp)
             case EOF: case '\'':
               break;
             }
-            break;
+          break;
         }
       tp->type = token_type_character_constant;
       return;
index 1d88f47a7d111c18ad960391ec7f57fd07d6eb03..288f9b7f51883a133e2e5f6d359d1dbeeafa914c 100644 (file)
@@ -622,6 +622,8 @@ phase3_get (token_ty *tp)
                 {
                 case '\\':
                   last_was_backslash = true;
+                  /* FALLTHROUGH */
+                default:
                   continue;
                 case '\n':
                   error_with_progname = false;