mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 21:58:44 +08:00
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
This commit is contained in:
parent
c993555b03
commit
e21239a3df
@ -20,6 +20,12 @@ Mon Jul 17 02:37:06 2000 Marc Espie <espie@openbsd.org>
|
||||
|
||||
2000-07-17 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* 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.
|
||||
|
||||
* c-common.c (check_format_info): Do not make a pedantic objection
|
||||
to the 'L' length modifier if used with a floating point type
|
||||
character.
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user