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  <markeggleston@gcc.gnu.org>

gcc/fortran/

	PR fortran/52279
	* check.c (gfc_invalid_boz):  Change array declaration for
	hint into a pointer.
This commit is contained in:
Mark Eggleston 2020-07-02 08:54:10 +01:00
parent 00f24f5673
commit d0e7c73c51

View file

@ -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);