This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch, fortran] Add _gfortran_error_stop_numeric


Janne Blomqvist wrote:
> Also, I see that note 8.30 recommends that the exit status is 0 for
> STOP and ERROR STOP with a string or empty stop code. Perhaps we
> should follow this recommendation? Personally, for ERROR STOP a think
> a better recommendation would have been "a processor-dependent
> non-zero exit status", but it is what it is.
>   

I think it does not make sense to follow this recommendation for ERROR
STOP.  The normative text states:

"Execution of a STOP statement initiates normal termination of
execution. Execution of an ERROR STOP statement initiates error
termination of execution."

And the convention is that a non-zero exit status code indicates an
error while zero indicates no error. Thus, I strongly vote for ignoring
this part of the non-normative note and keep the non-zero exit status
code for ERROR STOP.

Regarding the STOP message: One could also consider outputting the
message in the front-end generated code and only then call the library
function, which then calls exit() with the front-end supplied value;
that value; that value can be a normal integer - no need to cater for
integer(8); only for the out string the support for integer(8) is needed.

Tobias


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