Method CompilerEnvironment()->CPP()->report()


Method report

void report(SeverityLevel severity, string filename, int(1..) linenumber, string subsystem, sprintf_format message, sprintf_args ... extra_args)

Description

Report a diagnostic from the preprocessor.

Parameter severity

The severity of the diagnostic.

Parameter filename
Parameter linenumber

Location which triggered the diagnostic.

Parameter subsystem

Typically "cpp".

Parameter message

String with the diagnostic message, with optional sprintf()-style formatting (if any extra_args).

Parameter extra_args

Extra arguments to sprintf().

The default implementation does the following:

  • If there's a handler which implements Reporter()->report(), call it with the same arguments.

  • Otherwise if there's a handler which implements compile_warning() or compile_error() that matches severity, call it with suitable arguments.

  • Otherwise if there's a compat handler, use it in the same manner as the handler.

  • Otherwise fall back to calling ::report() with the same arguments.

Note

In Pike 8.0 and earlier MasterObject()->report() was not called.

See also

Reporter()->report()


Method report

void report(SeverityLevel severity, string filename, int(1..) linenumber, string subsystem, string message, mixed ... extra_args)

Description

Report a diagnostic from the preprocessor.

Parameter severity

The severity of the diagnostic.

Parameter filename
Parameter linenumber

Location which triggered the diagnostic.

Parameter subsystem

Always "cpp".

Parameter message

String with the diagnostic message, with optional sprintf()-style formatting (if any extra_args).

Parameter extra_args

Extra arguments to sprintf().

The default implementation just calls CompilerEnviroment::report() in the parent with the same arguments.

See also

Reporter()->report(), cpp_error()