Library warnings/errors at runtime

François-Xavier Coudert Francois-Xavier.Coudert@lcp.u-psud.fr
Tue May 10 21:41:00 GMT 2005


> If there isn't a GCC mechanism for communicating options set in 
> the frontend to the runtime library, then a possible method is
> an environmental variable.  This environmental variable would
> apply to all procedures in libgfortran. 

That would be a way, though environment variables are usually easy to break.

> We could have an option
> in the frontend (e.g., -fcheck-library or -fstrict-runtime) that
> sets GFC_RUNTIME_CHECK.  In libgfortran/runtime/main.c (init) the
> environmental variable is checked and if set, then a global boolean
> variable can be set that all runtime procedure can access.

I think the same thing can be done with a global, static variable (or 
more) with a convenient prefix (and that way, we could change it in 
different subroutines/functions). I'm not sure how we could do that, or 
if something along these lines is already done on Fortran (or some other 
front-end).

But we definetely need something... (and the same mechanisme could be 
used for bounds checking, and so on).

FX



More information about the Fortran mailing list