From: Mark Eggleston Date: Thu, 2 Jul 2020 07:54:10 +0000 (+0100) Subject: Fortran : portability fix for PR52279 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d0e7c73c515c305863620a821ee85bc557bfbef5;p=gcc.git 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. --- 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);