From d0e7c73c515c305863620a821ee85bc557bfbef5 Mon Sep 17 00:00:00 2001 From: Mark Eggleston Date: Thu, 2 Jul 2020 08:54:10 +0100 Subject: [PATCH] Fortran : portability fix for PR52279 Use of _() to enclose string literals assigned to arrays is not portable. Use pointer instead. 2020-07-02 Mark Eggleston gcc/fortran/ PR fortran/52279 * check.c (gfc_invalid_boz): Change array declaration for hint into a pointer. --- gcc/fortran/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 26ea01f6544..8ecf4ff4f50 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -67,7 +67,7 @@ gfc_invalid_boz (const char *msg, locus *loc) return false; } - const char hint[] = " [see %<-fno-allow-invalid-boz%>]"; + const char *hint = " [see %<-fno-allow-invalid-boz%>]"; size_t len = strlen (msg) + strlen (hint) + 1; char *msg2 = (char *) alloca (len); strcpy (msg2, msg); -- 2.30.2