On Mon, Dec 12, 2022 at 08:49:50PM +0100, Harald Anlauf via Fortran wrote:
> 
> Committed as r13-4623-gcf5327b89ab610.
> 

To be clear, I have no problems with this commit.

But, just a FYI, there is gfc_peek_ascii_char(),
which allows you to look at the next character
without having to keep track of the locus.

> +    {
> +      locus old_loc = gfc_current_locus;
> +      if (gfc_match_char ('*') == MATCH_YES)

         gfc_gobble_whitespace (); /* Can't remember if matching up to this
                                      eats whitespace.  */ 
         if (gfc_peek_ascii_char () == '*')

> +     {
> +       /* F2018:R821: "assumed-implied-spec  is  [ lower-bound : ] *".  */
> +       gfc_error ("A lower bound must precede colon in "
> +                  "assumed-size array specification at %L", &old_loc);
> +       return AS_UNKNOWN;
> +     }
> +      else
> +     {
          gfc_current_locus = old_loc; /* Is this needed? */
> +       return AS_DEFERRED;
> +     }
> +    }


-- 
Steve

Reply via email to