[Patch,gfortran] ENUMERATIONS and ENUMERATORS
Tobias.Schlueter@Physik.Uni-Muenchen.DE
Tobias.Schlueter@Physik.Uni-Muenchen.DE
Fri Oct 21 15:51:00 GMT 2005
Quoting Gaurav Gautam <gauravgautam123@gmail.com>:
> yes, but the default error message would be some thing like "unclassified
> statement". which i think may mislead the user.
> i did that to make the error message more appropriate . Actually i need to
> check for three kinds for errors at this point of time.
>
> they can be like
>
> err 1) only
>
> enumerator :: a, b
> occurs without a enum, bind (C) statement.
>
> err 2)
> enum, bind (C)
> real :: a, b
>
> err 3)
> enum, bind (C)
> integer :: a, b
>
> so to be more informative abt distinguishing, all three, i did this (had to
> add three diff checks ).
The only difference you made between the latter two cases is in the
capitalization of 's' :-) That aside, I'd rather have a slightly worse error
message and readable code. Again, I think you could save yourself all the
special-casing if you wrote a dedicated matcher for this.
- Tobi
More information about the Fortran
mailing list