Add format checking for `q' (quad) modifier.
From-SVN: r8093
This commit is contained in:
parent
9dd53f1e78
commit
2314fb7008
|
@ -483,9 +483,11 @@ found_attr:;
|
||||||
|
|
||||||
#define T_I &integer_type_node
|
#define T_I &integer_type_node
|
||||||
#define T_L &long_integer_type_node
|
#define T_L &long_integer_type_node
|
||||||
|
#define T_LL &long_long_integer_type_node
|
||||||
#define T_S &short_integer_type_node
|
#define T_S &short_integer_type_node
|
||||||
#define T_UI &unsigned_type_node
|
#define T_UI &unsigned_type_node
|
||||||
#define T_UL &long_unsigned_type_node
|
#define T_UL &long_unsigned_type_node
|
||||||
|
#define T_ULL &long_long_unsigned_type_node
|
||||||
#define T_US &short_unsigned_type_node
|
#define T_US &short_unsigned_type_node
|
||||||
#define T_F &float_type_node
|
#define T_F &float_type_node
|
||||||
#define T_D &double_type_node
|
#define T_D &double_type_node
|
||||||
|
@ -506,6 +508,9 @@ typedef struct {
|
||||||
/* Type of argument if length modifier `l' is used.
|
/* Type of argument if length modifier `l' is used.
|
||||||
If NULL, then this modifier is not allowed. */
|
If NULL, then this modifier is not allowed. */
|
||||||
tree *llen;
|
tree *llen;
|
||||||
|
/* Type of argument if length modifier `q' is used.
|
||||||
|
If NULL, then this modifier is not allowed. */
|
||||||
|
tree *qlen;
|
||||||
/* Type of argument if length modifier `L' is used.
|
/* Type of argument if length modifier `L' is used.
|
||||||
If NULL, then this modifier is not allowed. */
|
If NULL, then this modifier is not allowed. */
|
||||||
tree *bigllen;
|
tree *bigllen;
|
||||||
|
@ -514,32 +519,32 @@ typedef struct {
|
||||||
} format_char_info;
|
} format_char_info;
|
||||||
|
|
||||||
static format_char_info print_char_table[] = {
|
static format_char_info print_char_table[] = {
|
||||||
{ "di", 0, T_I, T_I, T_L, NULL, "-wp0 +" },
|
{ "di", 0, T_I, T_I, T_L, T_LL, NULL, "-wp0 +" },
|
||||||
{ "oxX", 0, T_UI, T_UI, T_UL, NULL, "-wp0#" },
|
{ "oxX", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0#" },
|
||||||
{ "u", 0, T_UI, T_UI, T_UL, NULL, "-wp0" },
|
{ "u", 0, T_UI, T_UI, T_UL, T_ULL, NULL, "-wp0" },
|
||||||
/* Two GNU extensions. */
|
/* Two GNU extensions. */
|
||||||
{ "Z", 0, T_ST, NULL, NULL, NULL, "-wp0" },
|
{ "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" },
|
||||||
{ "m", 0, T_UI, T_UI, T_UL, NULL, "-wp" },
|
{ "m", 0, T_UI, T_UI, T_UL, NULL, NULL, "-wp" },
|
||||||
{ "feEgG", 0, T_D, NULL, NULL, T_LD, "-wp0 +#" },
|
{ "feEgG", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" },
|
||||||
{ "c", 0, T_I, NULL, T_W, NULL, "-w" },
|
{ "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" },
|
||||||
{ "C", 0, T_W, NULL, NULL, NULL, "-w" },
|
{ "C", 0, T_W, NULL, NULL, NULL, NULL, "-w" },
|
||||||
{ "s", 1, T_C, NULL, T_W, NULL, "-wp" },
|
{ "s", 1, T_C, NULL, T_W, NULL, NULL, "-wp" },
|
||||||
{ "S", 1, T_W, NULL, NULL, NULL, "-wp" },
|
{ "S", 1, T_W, NULL, NULL, NULL, NULL, "-wp" },
|
||||||
{ "p", 1, T_V, NULL, NULL, NULL, "-w" },
|
{ "p", 1, T_V, NULL, NULL, NULL, NULL, "-w" },
|
||||||
{ "n", 1, T_I, T_S, T_L, NULL, "" },
|
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static format_char_info scan_char_table[] = {
|
static format_char_info scan_char_table[] = {
|
||||||
{ "di", 1, T_I, T_S, T_L, NULL, "*" },
|
{ "di", 1, T_I, T_S, T_L, T_LL, NULL, "*" },
|
||||||
{ "ouxX", 1, T_UI, T_US, T_UL, NULL, "*" },
|
{ "ouxX", 1, T_UI, T_US, T_UL, T_ULL, NULL, "*" },
|
||||||
{ "efgEG", 1, T_F, NULL, T_D, T_LD, "*" },
|
{ "efgEG", 1, T_F, NULL, T_D, NULL, T_LD, "*" },
|
||||||
{ "sc", 1, T_C, NULL, T_W, NULL, "*a" },
|
{ "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" },
|
||||||
{ "[", 1, T_C, NULL, NULL, NULL, "*a" },
|
{ "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" },
|
||||||
{ "C", 1, T_W, NULL, NULL, NULL, "*" },
|
{ "C", 1, T_W, NULL, NULL, NULL, NULL, "*" },
|
||||||
{ "S", 1, T_W, NULL, NULL, NULL, "*" },
|
{ "S", 1, T_W, NULL, NULL, NULL, NULL, "*" },
|
||||||
{ "p", 2, T_V, NULL, NULL, NULL, "*" },
|
{ "p", 2, T_V, NULL, NULL, NULL, NULL, "*" },
|
||||||
{ "n", 1, T_I, T_S, T_L, NULL, "" },
|
{ "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -885,7 +890,8 @@ check_format_info (info, params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*format_chars == 'h' || *format_chars == 'l' || *format_chars == 'L')
|
if (*format_chars == 'h' || *format_chars == 'l' || *format_chars == 'q' ||
|
||||||
|
*format_chars == 'L')
|
||||||
length_char = *format_chars++;
|
length_char = *format_chars++;
|
||||||
else
|
else
|
||||||
length_char = 0;
|
length_char = 0;
|
||||||
|
@ -994,6 +1000,7 @@ check_format_info (info, params)
|
||||||
default: wanted_type = fci->nolen ? *(fci->nolen) : 0; break;
|
default: wanted_type = fci->nolen ? *(fci->nolen) : 0; break;
|
||||||
case 'h': wanted_type = fci->hlen ? *(fci->hlen) : 0; break;
|
case 'h': wanted_type = fci->hlen ? *(fci->hlen) : 0; break;
|
||||||
case 'l': wanted_type = fci->llen ? *(fci->llen) : 0; break;
|
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 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break;
|
||||||
}
|
}
|
||||||
if (wanted_type == 0)
|
if (wanted_type == 0)
|
||||||
|
|
Loading…
Reference in New Issue