diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-12 20:39:18 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-12 20:39:18 +0000 |
commit | 6a78072d36ae9f17efded1ff6f8f85f610ffe715 (patch) | |
tree | fdb16e18f1fa6652d43d535ded79415b2270355b /gcc/c-format.c | |
parent | ef63afedd3d3d4d5557549441916b51679703085 (diff) | |
download | gcc-6a78072d36ae9f17efded1ff6f8f85f610ffe715.tar.gz |
PR fortran/32860
* error.c (error_uinteger): New function.
(error_integer): Call error_uinteger.
(error_print): Handle %u, %lu, %li and %ld format specifiers.
* interface.c (compare_actual_formal): Use the new %lu specifier.
* c-format.c (gcc_gfc_length_specs): New array.
(gcc_gfc_char_table): Add unsigned specifier, and references to
the l length modifier.
(format_types_orig): Use the new gcc_gfc_length_specs.
* gcc.dg/format/gcc_gfc-1.c: Updated with new formats.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127382 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-format.c')
-rw-r--r-- | gcc/c-format.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/c-format.c b/gcc/c-format.c index 9994cf4cc2d..8a36dd412fb 100644 --- a/gcc/c-format.c +++ b/gcc/c-format.c @@ -342,6 +342,15 @@ static const format_length_info strfmon_length_specs[] = { NULL, 0, 0, NULL, 0, 0 } }; + +/* For now, the Fortran front-end routines only use l as length modifier. */ +static const format_length_info gcc_gfc_length_specs[] = +{ + { "l", FMT_LEN_l, STD_C89, NULL, 0, 0 }, + { NULL, 0, 0, NULL, 0, 0 } +}; + + static const format_flag_spec printf_flag_specs[] = { { ' ', 0, 0, N_("' ' flag"), N_("the ' ' printf flag"), STD_C89 }, @@ -631,7 +640,8 @@ static const format_char_info gcc_cxxdiag_char_table[] = static const format_char_info gcc_gfc_char_table[] = { /* C89 conversion specifiers. */ - { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL }, + { "di", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "", NULL }, + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, 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 }, @@ -738,7 +748,7 @@ static const format_kind_info format_types_orig[] = 0, 0, 'p', 0, 'L', NULL, &integer_type_node }, - { "gcc_gfc", NULL, gcc_gfc_char_table, "", NULL, + { "gcc_gfc", gcc_gfc_length_specs, gcc_gfc_char_table, "", NULL, NULL, gcc_gfc_flag_pairs, FMT_FLAG_ARG_CONVERT, 0, 0, 0, 0, 0, |