]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update for gcc-4.3.
authorBruno Haible <bruno@clisp.org>
Thu, 21 Feb 2008 00:12:44 +0000 (00:12 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:38 +0000 (12:15 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/format-gcc-internal.c
gettext-tools/tests/ChangeLog
gettext-tools/tests/format-gcc-internal-1

index 1fc68d86e0d685afdd42a4386f7e0e3d58062070..787a5b498a419b9fa3cb93dc3aa7df27332bb1c2 100644 (file)
@@ -1,3 +1,11 @@
+2008-02-20  Jakub Jelinek  <jakub@redhat.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       * format-gcc-internal.c: Update for GCC 4.3.
+       (FAT_TREE_STATEMENT): New enum item.
+       (format_parse): Recognize %K.
+       (format_print): Update.
+
 2008-02-04  Bruno Haible  <bruno@clisp.org>
 
        * msgmerge.c (match_domain): Remove the prev_msgid fields also from
index 9c0295fb0fb50da49bb704a22df427651a0ca432..254929b8560117619a69a830fb8eb47addb1aa6d 100644 (file)
@@ -1,5 +1,5 @@
 /* GCC internal format strings.
-   Copyright (C) 2003-2007 Free Software Foundation, Inc.
+   Copyright (C) 2003-2008 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
 #define _(str) gettext (str)
 
 /* GCC internal format strings consist of language frontend independent
-   format directives, implemented in gcc-4.1.0/gcc/pretty-print.c (function
+   format directives, implemented in gcc-4.3.0/gcc/pretty-print.c (function
    pp_base_format), plus some frontend dependent extensions:
      - for the C/ObjC frontend
-       in gcc-4.1.0/gcc/c-objc-common.c (function c_tree_printer)
+       in gcc-4.3.0/gcc/c-objc-common.c (function c_tree_printer)
      - for the C++ frontend
-       in gcc-4.1.0/gcc/cp/error.c (function cp_printer)
+       in gcc-4.3.0/gcc/cp/error.c (function cp_printer)
    Taking these together, GCC internal format strings are specified as follows.
 
    A directive
@@ -69,6 +69,7 @@
            - 'p', that needs a 'void *' argument,
            - 'H', that needs a 'location_t *' argument,
            - 'J', that needs a general declaration argument,
+           - 'K', that needs a statement argument,
              [see gcc/pretty-print.c]
 
            - 'D', that needs a general declaration argument,
@@ -107,11 +108,12 @@ enum format_arg_type
   FAT_SIZE_LONGLONG    = 2 << 5,
   FAT_SIZE_WIDE                = 3 << 5,
   FAT_TREE_DECL                = 1 << 7,
-  FAT_TREE_FUNCDECL    = 2 << 7,
-  FAT_TREE_TYPE                = 3 << 7,
-  FAT_TREE_ARGUMENT    = 4 << 7,
-  FAT_TREE_EXPRESSION  = 5 << 7,
-  FAT_TREE_CV          = 6 << 7,
+  FAT_TREE_STATEMENT   = 2 << 7,
+  FAT_TREE_FUNCDECL    = 3 << 7,
+  FAT_TREE_TYPE                = 4 << 7,
+  FAT_TREE_ARGUMENT    = 5 << 7,
+  FAT_TREE_EXPRESSION  = 6 << 7,
+  FAT_TREE_CV          = 7 << 7,
   FAT_TREE_CODE_BINOP  = 1 << 10,
   FAT_TREE_CODE_ASSOP  = 2 << 10,
   FAT_FUNCPARAM                = 1 << 12,
@@ -417,6 +419,8 @@ format_parse (const char *format, bool translated, char *fdi,
              type = FAT_LOCATION;
            else if (*format == 'J')
              type = FAT_TREE | FAT_TREE_DECL;
+           else if (*format == 'K')
+             type = FAT_TREE | FAT_TREE_STATEMENT;
            else
              {
                if (*format == 'D')
@@ -764,6 +768,9 @@ format_print (void *descr)
        case FAT_TREE | FAT_TREE_DECL:
          printf ("D");
          break;
+       case FAT_TREE | FAT_TREE_STATEMENT:
+         printf ("K");
+         break;
        case FAT_TREE | FAT_TREE_FUNCDECL:
          printf ("F");
          break;
index c6dd399e5ef5777bcae8872989b6cfd4f9584b20..68016a9c4405f9bcbce83e7d67af1ae693d29323 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-20  Bruno Haible  <bruno@clisp.org>
+
+       * format-gcc-internal-1: Test also %K.
+
 2008-02-04  Bruno Haible  <bruno@clisp.org>
 
        * msgmerge-23: New file.
index da055e496a4d75bec0bb63b3daba6734d67c40db..3bd8f35b3a510bf0d66c3874efc835f5b2a708e4 100755 (executable)
@@ -43,6 +43,8 @@ cat <<\EOF > f-gi-1.data
 "abc%J"
 # Valid: %J with flags
 "%qJ"
+# Valid: %K with flags
+"%qK"
 # Valid: one pointer argument
 "abc%D"
 # Valid: one pointer argument