[gcc(refs/users/giulianob/heads/autopar_rebase2)] Fortran : portability fix for PR52279

Giuliano Belinassi giulianob@gcc.gnu.org
Tue Aug 18 00:23:11 GMT 2020


https://gcc.gnu.org/g:840f0fa6d94b18e50ef58c1531940e53abe71527

commit 840f0fa6d94b18e50ef58c1531940e53abe71527
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Jul 2 08:54:10 2020 +0100

    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.

Diff:
---
 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);


More information about the Gcc-cvs mailing list