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 ( character(*), intent(in) line,
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]lineFull source line containing the define
[in,out]macrosCurrent macro table (updated in-place)
[in]tokenUsually 'DEFINE' – keyword matched in uppercase

Remarks

Definition at line 48 of file diagnostics.f90.

◆ handle_warning()

subroutine, public handle_warning ( character(*), intent(in) line,
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]lineFull source line containing the undef
[in,out]macrosCurrent macro table (updated in-place)
[in]tokenUsually 'UNDEF' – keyword matched in uppercase

Remarks

Definition at line 68 of file diagnostics.f90.