#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "tree.h"#include "flags.h"#include "c-common.h"#include "toplev.h"#include "intl.h"#include "diagnostic.h"#include "langhooks.h"#include "c-format.h"

Go to the source code of this file.
| #define ADJ_STD | ( | VER | ) |
Value:
((int) ((VER) == STD_C9L \ ? (warn_long_long ? STD_C99 : STD_C89) \ : (VER)))
Definition at line 247 of file c-format.c.
| #define C_STD_NAME | ( | FEATURE_VER | ) |
Value:
(c_dialect_cxx () \ ? "ISO C++" \ : ((FEATURE_VER) == STD_EXT \ ? "ISO C" \ : "ISO C90"))
Definition at line 240 of file c-format.c.
| #define C_STD_VER |
Value:
((int) (c_dialect_cxx () \ ? CPLUSPLUS_STD_VER \ : (flag_isoc99 \ ? STD_C99 \ : (flag_isoc94 ? STD_C94 : STD_C89))))
Definition at line 232 of file c-format.c.
| #define CPLUSPLUS_STD_VER STD_C94 |
Definition at line 230 of file c-format.c.
| #define gcc_cdiag_flag_pairs gcc_diag_flag_pairs |
Definition at line 396 of file c-format.c.
| #define gcc_cdiag_flag_specs gcc_diag_flag_specs |
Definition at line 414 of file c-format.c.
| #define gcc_cdiag_length_specs gcc_diag_length_specs |
Definition at line 317 of file c-format.c.
| #define gcc_cxxdiag_flag_pairs gcc_diag_flag_pairs |
Definition at line 397 of file c-format.c.
| #define gcc_cxxdiag_length_specs gcc_diag_length_specs |
Definition at line 318 of file c-format.c.
| #define gcc_tdiag_flag_pairs gcc_diag_flag_pairs |
Definition at line 395 of file c-format.c.
| #define gcc_tdiag_flag_specs gcc_diag_flag_specs |
Definition at line 413 of file c-format.c.
| #define gcc_tdiag_length_specs gcc_diag_length_specs |
Definition at line 316 of file c-format.c.
| enum format_type |
Definition at line 60 of file c-format.c.
| static bool avoid_dollar_number | ( | const char * | format | ) | [static] |
| static void check_format_arg | ( | void * | ctx, | |
| tree | format_tree, | |||
| unsigned HOST_WIDE_INT | arg_num | |||
| ) | [static] |
Definition at line 1270 of file c-format.c.
References array_size, char_type_node, check_format_info_main(), decl_constant_value(), DECL_SIZE_UNIT, function_format_info::first_arg_num, gcc_assert, host_integerp(), HOST_WIDE_INT, info, format_check_context::info, integer_zerop(), format_check_results::number_empty, format_check_results::number_extra_args, format_check_results::number_non_literal, format_check_results::number_other, format_check_results::number_unterminated, format_check_results::number_wide, offset, format_check_context::params, format_check_context::res, STRIP_NOPS, TREE_CHAIN, TREE_CODE, TREE_INT_CST_LOW, tree_low_cst(), TREE_OPERAND, TREE_STRING_LENGTH, TREE_STRING_POINTER, TREE_TYPE, and TYPE_MAIN_VARIANT.
| static void check_format_info | ( | function_format_info * | info, | |
| tree | params | |||
| ) | [static] |
Definition at line 1168 of file c-format.c.
References format_wanted_type::arg_num, check_format_arg(), check_function_arguments_recurse(), function_format_info::first_arg_num, format_kind_info::flags, FMT_FLAG_ARG_CONVERT, function_format_info::format_num, function_format_info::format_type, HOST_WIDE_INT, format_check_context::info, format_kind_info::name, format_check_results::number_dollar_extra_args, format_check_results::number_empty, format_check_results::number_extra_args, format_check_results::number_non_literal, format_check_results::number_other, format_check_results::number_unterminated, format_check_results::number_wide, format_check_context::params, format_check_context::res, TREE_CHAIN, TREE_VALUE, warn_format_nonliteral, warn_format_security, and warning.
| static void check_format_info_main | ( | format_check_results * | res, | |
| function_format_info * | info, | |||
| const char * | format_chars, | |||
| int | format_length, | |||
| tree | params, | |||
| unsigned HOST_WIDE_INT | arg_num | |||
| ) | [static] |
Definition at line 1430 of file c-format.c.
References _, ADJ_STD, format_wanted_type::arg_num, avoid_dollar_number(), format_kind_info::bad_flag_pairs, C_STD_NAME, C_STD_VER, format_char_info::chain, format_wanted_type::char_lenient_flag, check_format_types(), format_kind_info::conversion_specs, d, format_length_info::double_index, format_length_info::double_name, format_length_info::double_std, FALSE, finish_dollar_format_checking(), function_format_info::first_arg_num, format_flag_pair::flag_char1, format_kind_info::flag_chars, format_char_info::flag_chars, flag_isoc99, format_kind_info::flag_specs, format_kind_info::flags, format_char_info::flags2, FMT_FLAG_ARG_CONVERT, FMT_FLAG_DOLLAR_GAP_POINTER_OK, FMT_FLAG_EMPTY_PREC_OK, FMT_FLAG_FANCY_PERCENT_OK, FMT_FLAG_SCANF_A_KLUDGE, FMT_FLAG_USE_DOLLAR, FMT_FLAG_ZERO_WIDTH_BAD, FMT_LEN_none, format_char_info::format_chars, function_format_info::format_type, get_flag_spec(), ggc_free(), GGC_NEW, i, format_length_info::index, init_dollar_format_checking(), ISDIGIT, ISGRAPH, format_kind_info::left_precision_char, format_kind_info::length_char_specs, format_kind_info::length_code_char, format_flag_spec::long_name, maybe_read_dollar_number(), format_kind_info::modifier_chars, format_type_detail::name, format_kind_info::name, format_flag_spec::name, format_length_info::name, format_wanted_type::name, format_wanted_type::next, next, NULL, format_check_results::number_extra_args, format_check_results::number_other, format_wanted_type::param, pedantic, format_wanted_type::pointer_count, format_char_info::pointer_count, format_kind_info::precision_char, format_kind_info::precision_type, format_flag_pair::predicate, format_wanted_type::reading_from_flag, s, format_flag_spec::skip_next_char, format_type_detail::std, format_length_info::std, format_flag_spec::std, format_char_info::std, STD_C89, strchr, strlen(), format_kind_info::suppression_char, TREE_CHAIN, TREE_VALUE, TRUE, format_type_detail::type, format_char_info::types, void_type_node, format_wanted_type::wanted_type, format_wanted_type::wanted_type_name, warn_format_y2k, warning, format_kind_info::width_char, format_kind_info::width_type, and format_wanted_type::writing_in_flag.
| static bool check_format_string | ( | tree | argument, | |
| unsigned HOST_WIDE_INT | format_num, | |||
| int | flags, | |||
| bool * | no_add_attrs | |||
| ) | [static] |
Definition at line 125 of file c-format.c.
References ATTR_FLAG_BUILT_IN, char_type_node, error(), HOST_WIDE_INT, i, TREE_CHAIN, TREE_CODE, TREE_TYPE, TREE_VALUE, and TYPE_MAIN_VARIANT.
| static void check_format_types | ( | format_wanted_type * | types, | |
| const char * | format_start, | |||
| int | format_length | |||
| ) | [static] |
Definition at line 2109 of file c-format.c.
References format_wanted_type::arg_num, c_common_signed_type(), c_common_unsigned_type(), format_wanted_type::char_lenient_flag, char_type_node, CONSTANT_CLASS_P, DECL_P, error_mark_node, format_type_warning(), gcc_assert, i, integer_zerop(), format_wanted_type::name, format_wanted_type::next, format_wanted_type::param, pedantic, format_wanted_type::pointer_count, format_wanted_type::reading_from_flag, signed_char_type_node, STRIP_NOPS, TREE_CODE, TREE_OPERAND, TREE_READONLY, TREE_TYPE, TYPE_MAIN_VARIANT, TYPE_READONLY, TYPE_RESTRICT, TYPE_UNSIGNED, TYPE_VOLATILE, unsigned_char_type_node, void_type_node, format_wanted_type::wanted_type, format_wanted_type::wanted_type_name, warning, and format_wanted_type::writing_in_flag.
Definition at line 860 of file c-format.c.
References a, args, c, char_type_node, check_format_info(), current_function_decl, DECL_ARGUMENTS, decode_format_attr(), decode_format_type(), function_format_info::first_arg_num, format_kind_info::flags, FMT_FLAG_ARG_CONVERT, function_format_info::format_type, IDENTIFIER_POINTER, info, is_attribute_p(), format_kind_info::name, NULL_TREE, TREE_CHAIN, TREE_CODE, TREE_PURPOSE, TREE_TYPE, TREE_VALUE, TYPE_ATTRIBUTES, TYPE_MAIN_VARIANT, warn_format, warn_missing_format_attribute, and warning.
| static bool decode_format_attr | ( | tree | args, | |
| function_format_info * | info, | |||
| int | validated_p | |||
| ) | [static] |
Definition at line 176 of file c-format.c.
References decode_format_type(), error(), function_format_info::first_arg_num, function_format_info::format_num, function_format_info::format_type, format_type_error, gcc_assert, get_constant(), IDENTIFIER_POINTER, p, TREE_CHAIN, TREE_CODE, TREE_VALUE, and warning.
| static int decode_format_type | ( | const char * | s | ) | [static] |
Definition at line 833 of file c-format.c.
References format_type_error, i, strcmp(), strlen(), and strncmp().
| static unsigned int find_char_info_specifier_index | ( | const format_char_info * | fci, | |
| int | c | |||
| ) | [static] |
Definition at line 2333 of file c-format.c.
References format_char_info::format_chars, gcc_unreachable, i, and strchr.
| static unsigned int find_length_info_modifier_index | ( | const format_length_info * | fli, | |
| int | c | |||
| ) | [static] |
Definition at line 2349 of file c-format.c.
References gcc_unreachable, i, format_length_info::name, and strchr.
| static void finish_dollar_format_checking | ( | format_check_results * | res, | |
| int | pointer_gap_ok | |||
| ) | [static] |
Definition at line 1106 of file c-format.c.
References i, format_check_results::number_dollar_extra_args, format_check_results::number_other, and warning.
| static void format_type_warning | ( | const char * | descr, | |
| const char * | format_start, | |||
| int | format_length, | |||
| tree | wanted_type, | |||
| int | pointer_count, | |||
| const char * | wanted_type_name, | |||
| tree | arg_type, | |||
| int | arg_num | |||
| ) | [static] |
Definition at line 2269 of file c-format.c.
References alloca, c_dialect_cxx, DECL_NAME, memset, p, strcmp(), TREE_CODE, TYPE_MAIN_VARIANT, TYPE_NAME, and warning.
Definition at line 155 of file c-format.c.
References gcc_assert, TREE_CODE, TREE_INT_CST_HIGH, and TREE_INT_CST_LOW.
| static const format_flag_spec * get_flag_spec | ( | const format_flag_spec * | spec, | |
| int | flag, | |||
| const char * | predicates | |||
| ) | [static] |
Definition at line 1142 of file c-format.c.
References format_flag_spec::flag_char, gcc_assert, i, NULL, and strchr.
| tree handle_format_arg_attribute | ( | tree * | node, | |
| tree | ARG_UNUSEDname, | |||
| tree | args, | |||
| int | flags, | |||
| bool * | no_add_attrs | |||
| ) |
Definition at line 87 of file c-format.c.
References ATTR_FLAG_BUILT_IN, char_type_node, check_format_string(), error(), get_constant(), HOST_WIDE_INT, NULL_TREE, TREE_CODE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, and TYPE_MAIN_VARIANT.
| tree handle_format_attribute | ( | tree * | node, | |
| tree | ARG_UNUSEDname, | |||
| tree | args, | |||
| int | flags, | |||
| bool * | no_add_attrs | |||
| ) |
Definition at line 2680 of file c-format.c.
References format_wanted_type::arg_num, asm_fprintf_format_type, ATTR_FLAG_BUILT_IN, check_format_string(), decode_format_attr(), error(), function_format_info::first_arg_num, function_format_info::format_num, function_format_info::format_type, gcc_cdiag_format_type, gcc_cxxdiag_format_type, gcc_diag_format_type, gcc_gfc_format_type, gcc_tdiag_format_type, gcc_unreachable, HOST_WIDE_INT, info, init_dynamic_asm_fprintf_info(), init_dynamic_diag_info(), init_dynamic_gfc_info(), memcpy, NULL, NULL_TREE, strftime_format_type, TARGET_N_FORMAT_TYPES, TREE_CHAIN, TYPE_ARG_TYPES, xmalloc(), and xmemdup().
Definition at line 930 of file c-format.c.
References free(), i, memset, TREE_CHAIN, TREE_CODE, TREE_TYPE, TREE_VALUE, and XNEWVEC.
Definition at line 2365 of file c-format.c.
References asm_fprintf_format_type, DECL_ORIGINAL_TYPE, error(), find_length_info_modifier_index(), FMT_LEN_l, FMT_LEN_ll, gcc_assert, gcc_unreachable, i, identifier_global_value(), format_length_info::index, format_kind_info::length_char_specs, long_integer_type_node, long_long_integer_type_node, maybe_get_identifier(), TREE_CODE, and xmemdup().
Definition at line 2473 of file c-format.c.
References format_kind_info::conversion_specs, DECL_ORIGINAL_TYPE, error(), find_char_info_specifier_index(), find_length_info_modifier_index(), FMT_LEN_l, FMT_LEN_ll, gcc_assert, gcc_cdiag_format_type, gcc_cxxdiag_format_type, gcc_diag_format_type, gcc_tdiag_format_type, gcc_unreachable, i, identifier_global_value(), format_length_info::index, format_kind_info::length_char_specs, long_integer_type_node, long_long_integer_type_node, maybe_get_identifier(), format_char_info::pointer_count, TREE_CODE, TREE_TYPE, format_type_detail::type, format_char_info::types, and xmemdup().
Definition at line 2424 of file c-format.c.
References format_kind_info::conversion_specs, error(), find_char_info_specifier_index(), gcc_gfc_format_type, i, identifier_global_value(), maybe_get_identifier(), format_char_info::pointer_count, TREE_CODE, TREE_TYPE, format_type_detail::type, format_char_info::types, and xmemdup().
Referenced by handle_format_attribute().
| static int maybe_read_dollar_number | ( | const char ** | format, | |
| int | dollar_needed, | |||
| tree | params, | |||
| tree * | param_ptr, | |||
| const format_kind_info * | fki | |||
| ) | [static] |
Definition at line 985 of file c-format.c.
References C_STD_NAME, format_kind_info::flags, FMT_FLAG_DOLLAR_MULTIPLE, gcc_assert, i, ISDIGIT, memset, format_kind_info::name, pedantic, STD_EXT, TREE_CHAIN, warning, and XRESIZEVEC.
| void set_Wformat | ( | int | setting | ) |
Definition at line 38 of file c-format.c.
References warn_format, warn_format_extra_args, warn_format_nonliteral, warn_format_security, warn_format_y2k, warn_format_zero_length, and warn_nonnull.
const format_char_info asm_fprintf_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +", "i", NULL },
{ "oxX", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "i", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
{ "O", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "R", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "I", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "L", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "U", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "r", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "@", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 516 of file c-format.c.
const format_flag_pair asm_fprintf_flag_pairs[] [static] |
Initial value:
{
{ ' ', '+', 1, 0 },
{ '0', '-', 1, 0 },
{ '0', 'p', 1, 'i' },
{ 0, 0, 0, 0 }
}
Definition at line 382 of file c-format.c.
const format_flag_spec asm_fprintf_flag_specs[] [static] |
Initial value:
{
{ ' ', 0, 0, N_("' ' flag"), N_("the ' ' printf flag"), STD_C89 },
{ '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
{ '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
{ '0', 0, 0, N_("'0' flag"), N_("the '0' printf flag"), STD_C89 },
{ '-', 0, 0, N_("'-' flag"), N_("the '-' printf flag"), STD_C89 },
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 369 of file c-format.c.
const format_length_info asm_fprintf_length_specs[] [static] |
Initial value:
{
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C89 },
{ "w", FMT_LEN_none, STD_C89, NULL, 0, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
}
Definition at line 300 of file c-format.c.
int dollar_arguments_alloc = 0 [static] |
Definition at line 917 of file c-format.c.
int dollar_arguments_count [static] |
Definition at line 918 of file c-format.c.
char* dollar_arguments_pointer_p = NULL [static] |
Definition at line 916 of file c-format.c.
char* dollar_arguments_used = NULL [static] |
Definition at line 915 of file c-format.c.
int dollar_first_arg_num [static] |
Definition at line 919 of file c-format.c.
int dollar_format_warned [static] |
Definition at line 921 of file c-format.c.
int dollar_max_arg_used [static] |
Definition at line 920 of file c-format.c.
format_kind_info* dynamic_format_types [static] |
Definition at line 771 of file c-format.c.
const format_kind_info* format_types = format_types_orig [static] |
Definition at line 768 of file c-format.c.
const format_kind_info format_types_orig[] [static] |
Definition at line 703 of file c-format.c.
const format_char_info gcc_cdiag_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL },
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "DEFJT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL },
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 582 of file c-format.c.
const format_char_info gcc_cxxdiag_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL },
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "ADEFJTV",0,STD_C89,{ T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+#", "", NULL },
{ "CLOPQ",0,STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 605 of file c-format.c.
const format_flag_spec gcc_cxxdiag_flag_specs[] [static] |
Initial value:
{
{ '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
{ '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
{ 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 416 of file c-format.c.
const format_char_info gcc_diag_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL },
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "J", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 536 of file c-format.c.
const format_flag_pair gcc_diag_flag_pairs[] [static] |
const format_flag_spec gcc_diag_flag_specs[] [static] |
Initial value:
{
{ '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
{ 'q', 0, 0, N_("'q' flag"), N_("the 'q' diagnostic flag"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 404 of file c-format.c.
const format_length_info gcc_diag_length_specs[] [static] |
Initial value:
{
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C89 },
{ "w", FMT_LEN_none, STD_C89, NULL, 0, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
}
Definition at line 308 of file c-format.c.
const format_char_info gcc_gfc_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "cR", NULL },
{ "C", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 631 of file c-format.c.
const format_flag_pair gcc_gfc_flag_pairs[] [static] |
const format_char_info gcc_tdiag_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "ox", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "pq", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "c", NULL },
{ "H", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q", "", NULL },
{ "DFJT", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL },
{ "<>'", 0, STD_C89, NOARGUMENTS, "", "", NULL },
{ "m", 0, STD_C89, NOARGUMENTS, "q", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 559 of file c-format.c.
const format_char_info monetary_char_table[] [static] |
int n_format_types = ARRAY_SIZE (format_types_orig) [static] |
Definition at line 773 of file c-format.c.
const format_char_info print_char_table[] [static] |
Initial value:
{
{ "di", 0, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "-wp0 +'I", "i", NULL },
{ "oxX", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL },
{ "u", 0, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "-wp0'I", "i", NULL },
{ "fgG", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#'I", "", NULL },
{ "eE", 0, STD_C89, { T89_D, BADLEN, BADLEN, T99_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#I", "", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, T94_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
{ "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "", "W", NULL },
{ "F", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "-wp0 +#'I", "", NULL },
{ "aA", 0, STD_C99, { T99_D, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +#", "", NULL },
{ "C", 0, STD_EXT, { TEX_WI, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "R", NULL },
{ "m", 0, STD_EXT, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 493 of file c-format.c.
const format_flag_pair printf_flag_pairs[] [static] |
Initial value:
{
{ ' ', '+', 1, 0 },
{ '0', '-', 1, 0 },
{ '0', 'p', 1, 'i' },
{ 0, 0, 0, 0 }
}
Definition at line 361 of file c-format.c.
const format_flag_spec printf_flag_specs[] [static] |
Initial value:
{
{ ' ', 0, 0, N_("' ' flag"), N_("the ' ' printf flag"), STD_C89 },
{ '+', 0, 0, N_("'+' flag"), N_("the '+' printf flag"), STD_C89 },
{ '#', 0, 0, N_("'#' flag"), N_("the '#' printf flag"), STD_C89 },
{ '0', 0, 0, N_("'0' flag"), N_("the '0' printf flag"), STD_C89 },
{ '-', 0, 0, N_("'-' flag"), N_("the '-' printf flag"), STD_C89 },
{ '\'', 0, 0, N_("''' flag"), N_("the ''' printf flag"), STD_EXT },
{ 'I', 0, 0, N_("'I' flag"), N_("the 'I' printf flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
{ 'p', 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 345 of file c-format.c.
const format_length_info printf_length_specs[] [static] |
Initial value:
{
{ "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
{ "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
{ "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
{ "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
{ "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 },
{ "t", FMT_LEN_t, STD_C99, NULL, 0, 0 },
{ "j", FMT_LEN_j, STD_C99, NULL, 0, 0 },
{ "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 },
{ "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT },
{ NULL, 0, 0, NULL, 0, 0 }
}
Definition at line 284 of file c-format.c.
const format_char_info scan_char_table[] [static] |
Initial value:
{
{ "di", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, TEX_LL, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "*w'I", "W", NULL },
{ "u", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "*w'I", "W", NULL },
{ "oxX", 1, STD_C89, { T89_UI, T99_UC, T89_US, T89_UL, T9L_ULL, TEX_ULL, T99_ST, T99_UPD, T99_UIM, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL },
{ "efgEG", 1, STD_C89, { T89_F, BADLEN, BADLEN, T89_D, BADLEN, T89_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "*w'", "W", NULL },
{ "c", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "cW", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW", NULL },
{ "[", 1, STD_C89, { T89_C, BADLEN, BADLEN, T94_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "cW[", NULL },
{ "p", 2, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL },
{ "n", 1, STD_C89, { T89_I, T99_SC, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, T99_IM, BADLEN, BADLEN, BADLEN }, "", "W", NULL },
{ "F", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, TEX_D32, TEX_D64, TEX_D128 }, "*w'", "W", NULL },
{ "aA", 1, STD_C99, { T99_F, BADLEN, BADLEN, T99_D, BADLEN, T99_LD, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w'", "W", NULL },
{ "C", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*w", "W", NULL },
{ "S", 1, STD_EXT, { TEX_W, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "*aw", "W", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 648 of file c-format.c.
const format_flag_pair scanf_flag_pairs[] [static] |
const format_flag_spec scanf_flag_specs[] [static] |
Initial value:
{
{ '*', 0, 0, N_("assignment suppression"), N_("the assignment suppression scanf feature"), STD_C89 },
{ 'a', 0, 0, N_("'a' flag"), N_("the 'a' scanf flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in scanf format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in scanf format"), STD_C89 },
{ '\'', 0, 0, N_("''' flag"), N_("the ''' scanf flag"), STD_EXT },
{ 'I', 0, 0, N_("'I' flag"), N_("the 'I' scanf flag"), STD_EXT },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 426 of file c-format.c.
const format_length_info scanf_length_specs[] [static] |
Initial value:
{
{ "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 },
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
{ "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
{ "L", FMT_LEN_L, STD_C89, NULL, 0, 0 },
{ "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
{ "t", FMT_LEN_t, STD_C99, NULL, 0, 0 },
{ "j", FMT_LEN_j, STD_C99, NULL, 0, 0 },
{ "H", FMT_LEN_H, STD_EXT, NULL, 0, 0 },
{ "D", FMT_LEN_D, STD_EXT, "DD", FMT_LEN_DD, STD_EXT },
{ NULL, 0, 0, NULL, 0, 0 }
}
Definition at line 321 of file c-format.c.
const format_flag_pair strfmon_flag_pairs[] [static] |
const format_flag_spec strfmon_flag_specs[] [static] |
Initial value:
{
{ '=', 0, 1, N_("fill character"), N_("fill character in strfmon format"), STD_C89 },
{ '^', 0, 0, N_("'^' flag"), N_("the '^' strfmon flag"), STD_C89 },
{ '+', 0, 0, N_("'+' flag"), N_("the '+' strfmon flag"), STD_C89 },
{ '(', 0, 0, N_("'(' flag"), N_("the '(' strfmon flag"), STD_C89 },
{ '!', 0, 0, N_("'!' flag"), N_("the '!' strfmon flag"), STD_C89 },
{ '-', 0, 0, N_("'-' flag"), N_("the '-' strfmon flag"), STD_C89 },
{ 'w', 0, 0, N_("field width"), N_("field width in strfmon format"), STD_C89 },
{ '#', 0, 0, N_("left precision"), N_("left precision in strfmon format"), STD_C89 },
{ 'p', 0, 0, N_("right precision"), N_("right precision in strfmon format"), STD_C89 },
{ 'L', 0, 0, N_("length modifier"), N_("length modifier in strfmon format"), STD_C89 },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 471 of file c-format.c.
const format_length_info strfmon_length_specs[] [static] |
const format_flag_pair strftime_flag_pairs[] [static] |
Initial value:
{
{ 'E', 'O', 0, 0 },
{ '_', '-', 0, 0 },
{ '_', '0', 0, 0 },
{ '-', '0', 0, 0 },
{ '^', '#', 0, 0 },
{ 0, 0, 0, 0 }
}
Definition at line 460 of file c-format.c.
const format_flag_spec strftime_flag_specs[] [static] |
Initial value:
{
{ '_', 0, 0, N_("'_' flag"), N_("the '_' strftime flag"), STD_EXT },
{ '-', 0, 0, N_("'-' flag"), N_("the '-' strftime flag"), STD_EXT },
{ '0', 0, 0, N_("'0' flag"), N_("the '0' strftime flag"), STD_EXT },
{ '^', 0, 0, N_("'^' flag"), N_("the '^' strftime flag"), STD_EXT },
{ '#', 0, 0, N_("'#' flag"), N_("the '#' strftime flag"), STD_EXT },
{ 'w', 0, 0, N_("field width"), N_("field width in strftime format"), STD_EXT },
{ 'E', 0, 0, N_("'E' modifier"), N_("the 'E' strftime modifier"), STD_C99 },
{ 'O', 0, 0, N_("'O' modifier"), N_("the 'O' strftime modifier"), STD_C99 },
{ 'O', 'o', 0, NULL, N_("the 'O' modifier"), STD_EXT },
{ 0, 0, 0, NULL, NULL, 0 }
}
Definition at line 445 of file c-format.c.
const format_char_info time_char_table[] [static] |
Initial value:
{
{ "ABZab", 0, STD_C89, NOLENGTHS, "^#", "", NULL },
{ "cx", 0, STD_C89, NOLENGTHS, "E", "3", NULL },
{ "HIMSUWdmw", 0, STD_C89, NOLENGTHS, "-_0Ow", "", NULL },
{ "j", 0, STD_C89, NOLENGTHS, "-_0Ow", "o", NULL },
{ "p", 0, STD_C89, NOLENGTHS, "#", "", NULL },
{ "X", 0, STD_C89, NOLENGTHS, "E", "", NULL },
{ "y", 0, STD_C89, NOLENGTHS, "EO-_0w", "4", NULL },
{ "Y", 0, STD_C89, NOLENGTHS, "-_0EOw", "o", NULL },
{ "%", 0, STD_C89, NOLENGTHS, "", "", NULL },
{ "C", 0, STD_C99, NOLENGTHS, "-_0EOw", "o", NULL },
{ "D", 0, STD_C99, NOLENGTHS, "", "2", NULL },
{ "eVu", 0, STD_C99, NOLENGTHS, "-_0Ow", "", NULL },
{ "FRTnrt", 0, STD_C99, NOLENGTHS, "", "", NULL },
{ "g", 0, STD_C99, NOLENGTHS, "O-_0w", "2o", NULL },
{ "G", 0, STD_C99, NOLENGTHS, "-_0Ow", "o", NULL },
{ "h", 0, STD_C99, NOLENGTHS, "^#", "", NULL },
{ "z", 0, STD_C99, NOLENGTHS, "O", "o", NULL },
{ "kls", 0, STD_EXT, NOLENGTHS, "-_0Ow", "", NULL },
{ "P", 0, STD_EXT, NOLENGTHS, "", "", NULL },
{ NULL, 0, 0, NOLENGTHS, NULL, NULL, NULL }
}
Definition at line 669 of file c-format.c.
1.5.6