aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-07-17 03:07:08 -0600
committerJeff Law <law@gcc.gnu.org>2000-07-17 03:07:08 -0600
commite21239a3dfd5281f2c8deb7c048ffba65db1da02 (patch)
tree7ea24bca6db6b5b0cc6b3f197acc2db7446de9cb /gcc/c-common.c
parentc993555b03e478bec8876e469ee24569405143a8 (diff)
downloadgcc-e21239a3dfd5281f2c8deb7c048ffba65db1da02.zip
gcc-e21239a3dfd5281f2c8deb7c048ffba65db1da02.tar.gz
gcc-e21239a3dfd5281f2c8deb7c048ffba65db1da02.tar.bz2
c-common.c (scan_char_table): Allow "z" length modifiers on diouxXn formats.
* c-common.c (scan_char_table): Allow "z" length modifiers on diouxXn formats. (check_format_info): Use TYPE_DOMAIN on the type matched against for "z" formats, to retrieve the language size_t rather than the internal one. From-SVN: r35083
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 1e31b29..c7b5601 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1239,8 +1239,8 @@ static format_char_info print_char_table[] = {
};
static format_char_info scan_char_table[] = {
- { "di", 1, T_I, T_C, T_S, T_L, T_LL, T_LL, NULL, "*" },
- { "ouxX", 1, T_UI, T_UC, T_US, T_UL, T_ULL, T_ULL, NULL, "*" },
+ { "di", 1, T_I, T_C, T_S, T_L, T_LL, T_LL, T_ST, "*" },
+ { "ouxX", 1, T_UI, T_UC, T_US, T_UL, T_ULL, T_ULL, T_ST, "*" },
{ "efgEGaA", 1, T_F, NULL, NULL, T_D, NULL, T_LD, NULL, "*" },
{ "c", 1, T_C, NULL, NULL, T_W, NULL, NULL, NULL, "*" },
{ "s", 1, T_C, NULL, NULL, T_W, NULL, NULL, NULL, "*a" },
@@ -1248,7 +1248,7 @@ static format_char_info scan_char_table[] = {
{ "C", 1, T_W, NULL, NULL, NULL, NULL, NULL, NULL, "*" },
{ "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, NULL, "*a" },
{ "p", 2, T_V, NULL, NULL, NULL, NULL, NULL, NULL, "*" },
- { "n", 1, T_I, T_C, T_S, T_L, T_LL, NULL, NULL, "" },
+ { "n", 1, T_I, T_C, T_S, T_L, T_LL, NULL, T_ST, "" },
{ NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
};
@@ -1931,7 +1931,11 @@ check_format_info (info, params)
case 'l': wanted_type = fci->llen ? *(fci->llen) : 0; break;
case 'q': wanted_type = fci->qlen ? *(fci->qlen) : 0; break;
case 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break;
- case 'z': case 'Z': wanted_type = fci->zlen ? *fci->zlen : 0; break;
+ case 'z': case 'Z': wanted_type = (fci->zlen
+ ? (TYPE_DOMAIN (*fci->zlen)
+ ? TYPE_DOMAIN (*fci->zlen)
+ : *fci->zlen)
+ : 0); break;
}
if (wanted_type == 0)
warning ("use of `%c' length character with `%c' type character",