PR13940 - Allow x for boz-literal-constant
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue May 11 20:23:00 GMT 2004
I just discovered gfc_notify_std() and thought this would be the right
function for dealing with the message for this extension.
Bootstrapped and tested. I have attached a compile testcase. This should
maybe be put together in one file with the testcase I submitted earlier
for PR 13628.
- Tobi
2004-05-11 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
* primary.c (match_boz_constant): Use gfc_notify_std() for
issuing a warning or an error.
Index: primary.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fortran/Attic/primary.c,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 primary.c
--- primary.c 9 May 2004 15:16:11 -0000 1.1.2.6
+++ primary.c 11 May 2004 20:16:33 -0000
@@ -255,9 +256,12 @@ match_boz_constant (gfc_expr ** result)
rname = "octal";
break;
case 'x':
- if (pedantic)
- gfc_warning_now ("Hexadecimal constant at %C uses non-standard "
- "syntax. Use \"Z\" instead.");
+ if (pedantic
+ && (gfc_notify_std (GFC_STD_GNU, "Extension: Hexadecimal "
+ "constant at %C uses non-standard syntax.")
+ == FAILURE))
+ goto backup;
+
/* Fall through. */
case 'z':
radix = 16;
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: datax.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20040511/444342e1/attachment.f90>
More information about the Fortran
mailing list