This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
[...]this is a proposal for dealing with PR 30389, or rather with the inconsitensies with the ASCII handling.
My proposal, as done in the patch below, is to remove the
special-casing of ASCII charachters altogether. AFAIK, this is
safe for current patforms, because we don't support non-ASCII
platforms anyway.
There is precedent; for example, ifort always uses the native character set for the ASCII functions.
@@ -271,17 +246,16 @@ gfc_expr *
gfc_simplify_achar (gfc_expr *e)
{
gfc_expr *result;
- int index;
+ int c;
if (e->expr_type != EXPR_CONSTANT)
return NULL;
/* We cannot assume that the native character set is ASCII in this
function. */
- if (gfc_extract_int (e, &index) != NULL || index < 0 || index > 127) + if (gfc_extract_int (e, &c) != NULL || c < 0 || c > UCHAR_MAX) { - gfc_error ("Extended ASCII not implemented: argument of ACHAR at %L " - "must be between 0 and 127", &e->where); + gfc_error ("Bad character in ACHAR function at %L ", &e->where); return &gfc_bad_expr;
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |