diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-02-28 00:38:12 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2005-02-28 00:38:12 +0000 |
commit | f4e7375a8a167e98de05f2f0b34a8fd6f57e0a96 (patch) | |
tree | cbc3880b0e8c64b79072dbafe871b8a955a65bf8 /gcc/fortran/primary.c | |
parent | c7861585d36aca4c53aa894661e9c46013665d34 (diff) | |
download | gcc-f4e7375a8a167e98de05f2f0b34a8fd6f57e0a96.zip gcc-f4e7375a8a167e98de05f2f0b34a8fd6f57e0a96.tar.gz gcc-f4e7375a8a167e98de05f2f0b34a8fd6f57e0a96.tar.bz2 |
re PR fortran/20058 (Error on kind 16 hex data statement)
PR fortran/20058
* trans-types.c (gfc_max_integer_kind): Declare
(gfc_init_kinds): Initialize it.
* gfortran.h (gfc_max_integer_kind): extern it.
* primary.c (match_boz_constant): Use it; remove gfortran extension
of kind suffixes on BOZ literal constants
From-SVN: r95643
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index f3c51ab..b87d72a 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -300,17 +300,15 @@ match_boz_constant (gfc_expr ** result) match_digits (0, radix, buffer); gfc_next_char (); /* Eat delimiter. */ - kind = get_kind (); - if (kind == -1) - return MATCH_ERROR; - if (kind == -2) - kind = gfc_default_integer_kind; - else if (pedantic - && (gfc_notify_std (GFC_STD_GNU, "Extension: Kind parameter " - "suffix to boz literal constant at %C.") - == FAILURE)) - return MATCH_ERROR; + /* In section 5.2.5 and following C567 in the Fortran 2003 standard, we find + "If a data-stmt-constant is a boz-literal-constant, the corresponding + variable shall be of type integer. The boz-literal-constant is treated + as if it were an int-literal-constant with a kind-param that specifies + the representation method with the largest decimal exponent range + supported by the processor." */ + + kind = gfc_max_integer_kind; e = gfc_convert_integer (buffer, kind, radix, &gfc_current_locus); if (gfc_range_check (e) != ARITH_OK) |