diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-01-16 08:50:57 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-01-16 08:50:57 +0100 |
commit | c35a3046247c495509610b50c7a85683d540811a (patch) | |
tree | 330563b37abe5109f2834b61a9593807f05c231e /gcc/fortran/check.c | |
parent | 03647d2e26176bb874460b67deab0c30aa715d59 (diff) | |
download | gcc-c35a3046247c495509610b50c7a85683d540811a.zip gcc-c35a3046247c495509610b50c7a85683d540811a.tar.gz gcc-c35a3046247c495509610b50c7a85683d540811a.tar.bz2 |
PR93253 – Document BOZ changes, make it friendlier in legacy code
PR fortran/93253
* check.c (gfc_invalid_boz): Mention -fallow-invalid-boz
in the error message.
* gfortran.texi (BOZ literal constants): List another missing
extension and refer to -fallow-invalid-boz.
* lang.opt (fallow-invalid-boz): Also mention 'X' in the help text
as it is not covered by the previous wording.
* primary.c (match_boz_constant): Tweak wording such that it is
clear how to fix the nonstandard use.
PR fortran/93253
* fortran.dg/boz_7.f90: Updated dg-error.
Diffstat (limited to 'gcc/fortran/check.c')
-rw-r--r-- | gcc/fortran/check.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index c7f0187..519aa8b 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -67,7 +67,12 @@ gfc_invalid_boz (const char *msg, locus *loc) return false; } - gfc_error (msg, loc); + const char hint[] = " [see %<-fno-allow-invalid-boz%>]"; + size_t len = strlen (msg) + strlen (hint) + 1; + char *msg2 = (char *) alloca (len); + strcpy (msg2, msg); + strcat (msg2, hint); + gfc_error (msg2, loc); return true; } |