]> git.ipfire.org Git - thirdparty/gcc.git/commit
c-format.c/Fortran: Support %wd / host-wide integer in gfc_error
authorTobias Burnus <tobias@codesourcery.com>
Fri, 20 Aug 2021 13:43:32 +0000 (15:43 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 20 Aug 2021 13:43:32 +0000 (15:43 +0200)
commit1b507b1e3c58c063b9cf803dff80c28d4626cb5d
tree3a61a7da692a0771377ad3b0b7e6209d49dac4c5
parent12f22906d3c025e7edb60e3264dc9cd27a49e3e1
c-format.c/Fortran: Support %wd / host-wide integer in gfc_error

This patch adds support for the 'll' (long double)
and 'w' (HOST_WIDE_INT) length modifiers to the
Fortran FE diagnostic function (gfc_error, gfc_warning, ...)

gcc/c-family/ChangeLog:

* c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
(gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
"di" and "u", respecitively; fill with BADLEN to match
size of 'types'.
(get_init_dynamic_hwi): Split off from ...
(init_dynamic_diag_info): ... here. Call it.
(init_dynamic_gfc_info): Call it.

gcc/fortran/ChangeLog:

* error.c
(error_uinteger): Take 'long long unsigned' instead
of 'long unsigned' as argumpent.
(error_integer): Take 'long long' instead of 'long'.
(error_hwuint, error_hwint): New.
(error_print): Update to handle 'll' and 'w'
length modifiers.
* simplify.c (substring_has_constant_len): Use '%wd'
in gfc_error.
gcc/c-family/c-format.c
gcc/fortran/error.c
gcc/fortran/simplify.c