push_char (dtp, 'n');
push_char (dtp, 'a');
push_char (dtp, 'n');
+
+ /* Match "NAN(alphanum)". */
+ if (c == '(')
+ {
+ for ( ; c != ')'; c = next_char (dtp))
+ if (is_separator (c))
+ goto bad;
+
+ c = next_char (dtp);
+ if (is_separator (c))
+ unget_char (dtp, c);
+ }
goto done;
}
goto unwind;
c = next_char (dtp);
l_push_char (dtp, c);
+
+ /* Match NAN(alphanum). */
+ if (c == '(')
+ {
+ for (c = next_char (dtp); c != ')'; c = next_char (dtp))
+ if (is_separator (c))
+ goto unwind;
+ else
+ l_push_char (dtp, c);
+
+ l_push_char (dtp, ')');
+ c = next_char (dtp);
+ l_push_char (dtp, c);
+ }
}
if (!is_separator (c))
/* If -std=f95/2003 or an array section is specified,
do not allow excess data to be processed. */
if (is_array_section == 1
- || compile_options.allow_std < GFC_STD_GNU)
+ || !(compile_options.allow_std & GFC_STD_GNU))
ls[dim].end = ls[dim].start;
else
dtp->u.p.expanded_read = 1;
goto nml_err_ret;
}
- if (!component_flag)
+ if (*pprev_nl == NULL || !component_flag)
first_nl = nl;
root_nl = nl;
+
component_flag = 1;
c = next_char (dtp);
if (nml_get_obj_data (dtp, &prev_nl, nml_err_msg, sizeof nml_err_msg)
== FAILURE)
{
- gfc_unit *u;
-
if (dtp->u.p.current_unit->unit_number != options.stdin_unit)
goto nml_err_ret;
-
- u = find_unit (options.stderr_unit);
- st_printf ("%s\n", nml_err_msg);
- if (u != NULL)
- {
- sflush (u->s);
- unlock_unit (u);
- }
+ generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);
}
-
- }
+ }
dtp->u.p.eof_jump = NULL;
free_saved (dtp);