Loading...
Searching...
No Matches
Diagnostics

Definition

Processing of warning and error preprocessor directives This module implements the core logic for handling messages (either as warning or errors).

Examples

  1. Break preprocessing on error:
    #ifdef __vax__
    #error
    #endif
    ...
  2. Warn version mismatch:
    #if __STDF__ > 1
    #warning
    #endif
    ...

Methods

◆ handle_error()

subroutine, public handle_error ( type(context), intent(in) ctx,
type(macro), dimension(:), intent(inout), allocatable macros,
character(*), intent(in) token )

Process a error directive. It causes the preprocessor to report a fatal error that stops the preprocessor. The string forming the rest of the line following ‘::error’ is printed in the standard error.

Parameters
[in]ctxContext source line containing the define
[in,out]macrosCurrent macro table (updated in-place)
[in]tokenUsually 'DEFINE' – keyword matched in lowercase

Remarks

Definition at line 49 of file diagnostics.f90.

◆ handle_warning()

subroutine, public handle_warning ( type(context), intent(in) ctx,
type(macro), dimension(:), intent(inout), allocatable macros,
character(*), intent(in) token )

Process a warning directive. It causes the preprocessor to report a warning that does not stop the preprocessor. The string forming the rest of the line following ‘::warning’ is printed in the standard output.

Parameters
[in]ctxContext source line containing the undef
[in,out]macrosCurrent macro table (updated in-place)
[in]tokenUsually 'UNDEF' – keyword matched in lowercase

Remarks

Definition at line 69 of file diagnostics.f90.