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]

Re: Library warnings/errors at runtime


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]