summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-02-21 00:12:44 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:15:38 +0200
commit67de609c173ae1dd4c616c6f7288a696ed8d0c06 (patch)
treed80eef3dd27347e919104fb11417be6bdacfd7ec
parente00be2fb2b7eb5f8557a46872a939e982b75747d (diff)
downloadexternal_gettext-67de609c173ae1dd4c616c6f7288a696ed8d0c06.zip
external_gettext-67de609c173ae1dd4c616c6f7288a696ed8d0c06.tar.gz
external_gettext-67de609c173ae1dd4c616c6f7288a696ed8d0c06.tar.bz2
Update for gcc-4.3.
-rw-r--r--gettext-tools/src/ChangeLog8
-rw-r--r--gettext-tools/src/format-gcc-internal.c25
-rw-r--r--gettext-tools/tests/ChangeLog4
-rwxr-xr-xgettext-tools/tests/format-gcc-internal-12
4 files changed, 30 insertions, 9 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog
index 1fc68d8..787a5b4 100644
--- a/gettext-tools/src/ChangeLog
+++ b/gettext-tools/src/ChangeLog
@@ -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
diff --git a/gettext-tools/src/format-gcc-internal.c b/gettext-tools/src/format-gcc-internal.c
index 9c0295f..254929b 100644
--- a/gettext-tools/src/format-gcc-internal.c
+++ b/gettext-tools/src/format-gcc-internal.c
@@ -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
@@ -32,12 +32,12 @@
#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;
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog
index c6dd399..68016a9 100644
--- a/gettext-tools/tests/ChangeLog
+++ b/gettext-tools/tests/ChangeLog
@@ -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.
diff --git a/gettext-tools/tests/format-gcc-internal-1 b/gettext-tools/tests/format-gcc-internal-1
index da055e4..3bd8f35 100755
--- a/gettext-tools/tests/format-gcc-internal-1
+++ b/gettext-tools/tests/format-gcc-internal-1
@@ -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