Hi. The patch is about suppression of the following warning:
/home/gcc/buildworker/zenith-gcc-trunk-weekly/build/libgfortran/intrinsics/date_and_time.c:165:33: warning: ‘%04d’ directive output may be truncated writing between 4 and 11 bytes into a region of size 9 [-Wformat-truncation=] /home/gcc/buildworker/zenith-gcc-trunk-weekly/build/libgfortran/intrinsics/date_and_time.c:172:33: warning: ‘%+03d’ directive output may be truncated writing between 3 and 9 bytes into a region of size 6 [-Wformat-truncation=] Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin libgfortran/ChangeLog: 2019-05-03 Martin Liska <mli...@suse.cz> * intrinsics/date_and_time.c (DATE_LEN): Enlarge in order to deal with the warning. (ZONE_LEN): Likewise. --- libgfortran/intrinsics/date_and_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c index d536404a214..ff7204762da 100644 --- a/libgfortran/intrinsics/date_and_time.c +++ b/libgfortran/intrinsics/date_and_time.c @@ -117,9 +117,9 @@ gmtime_r (const time_t * timep, struct tm * result) TODO : - Check year boundaries. */ -#define DATE_LEN 8 +#define DATE_LEN 24 #define TIME_LEN 10 -#define ZONE_LEN 5 +#define ZONE_LEN 11 #define VALUES_SIZE 8 extern void date_and_time (char *, char *, char *, gfc_array_i4 *,