Qore Programming Language Reference Manual 0.8.8

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
Variables
Warning Constants

## Variables
const | Qore::WARN_ALL = QP_WARN_ALL
| Enables all warnings.
const | Qore::WARN_CALL_WITH_TYPE_ERRORS = QP_WARN_CALL_WITH_TYPE_ERRORS
| Enables warnings when the parser determines that the argument types of a function or method call are such that the operation is guaranteed to produce a constant value. More...
const | Qore::WARN_DEFAULT = QP_WARN_DEFAULT
| The default warning mask. More...
const | Qore::WARN_DEPRECATED = QP_WARN_DEPRECATED
| Enables a warning when deprecated code is used. More...
const | Qore::WARN_DUPLICATE_BLOCK_VARS = QP_WARN_DUPLICATE_BLOCK_VARS
| Enables a warning when a program declares a local variable more than once in the same block; note that this is not a warning but rather an error when assume-local or new-style parse options are set. More...
const | Qore::WARN_DUPLICATE_GLOBAL_VARS = QP_WARN_DUPLICATE_GLOBAL_VARS
| Indicates that the embedded code has declared the same global variable more than once. More...
const | Qore::WARN_DUPLICATE_HASH_KEY = QP_WARN_DUPLICATE_HASH_KEY
| Enables a warning when an immediate hash is declared and at least one of the keys is repeated. More...
const | Qore::WARN_DUPLICATE_LOCAL_VARS = QP_WARN_DUPLICATE_LOCAL_VARS
| Enables a warning when a local variable with the same name is declared in a subblock (ie another local variable with the same name is reachable in the same lexical scope); note that this warning can raise false positives if the programmer is used to redeclaring the same variable names in subblocks. More...
const | Qore::WARN_EXCESS_ARGS = QP_WARN_EXCESS_ARGS
| Enables a warning when a function or method call is made with more arguments than are used by the function or method. More...
const | Qore::WARN_INVALID_OPERATION = QP_WARN_INVALID_OPERATION
| Indicates that the embedded code performs some operation that is guaranteed to produce no result (for example, using the [] operator on an integer value) More...
const | Qore::WARN_MODULES = QP_WARN_MODULES
| The default warning mask for user modules. More...
const | Qore::WARN_NONE = QP_WARN_NONE
| Represents no warning.
const | Qore::WARN_NONEXISTENT_METHOD_CALL = QP_WARN_NONEXISTENT_METHOD_CALL
| Indicates that the embedded code is calling an unknown method in a class. More...
const | Qore::WARN_RETURN_VALUE_IGNORED = QP_WARN_RETURN_VALUE_IGNORED
| Enables a warning when a function or method call is made with no side effects and the return value is ignored. More...
const | Qore::WARN_UNDECLARED_VAR = QP_WARN_UNDECLARED_VAR
| Indicates that the embedded code referenced an undeclared variable that will be assumed to be a global variable. More...
const | Qore::WARN_UNKNOWN_WARNING = QP_WARN_UNKNOWN_WARNING
| Indicates that the embedded code tried to enable or disable an unknown warning. More...
const | Qore::WARN_UNREACHABLE_CODE = QP_WARN_UNREACHABLE_CODE
| Indicates that code cannot be reached (for example; code in the same local block after an unconditional return or thread_exit statement) More...
const | Qore::WARN_UNREFERENCED_VARIABLE = QP_WARN_UNREFERENCED_VARIABLE
| This warning is raised when a variable is declared in a block but never referenced. More...
const | Qore::WARN_WARNING_MASK_UNCHANGED = QP_WARN_WARNING_MASK_UNCHANGED
| This warning means that the embedded code tried to change the warning mask, but it was locked, so the warning mask was actually unchanged. More...

## Detailed Description

These are the possible values that can be or'ed together to set the Program warning mask

## Variable Documentation

const Qore::WARN_CALL_WITH_TYPE_ERRORS = QP_WARN_CALL_WITH_TYPE_ERRORS

Enables warnings when the parser determines that the argument types of a function or method call are such that the operation is guaranteed to produce a constant value.

See Also
  call-with-type-errors

const Qore::WARN_DEFAULT = QP_WARN_DEFAULT

The default warning mask.

This warning is made up of the following values combined with binary or:

- WARN_UNKNOWN_WARNING
- WARN_UNREACHABLE_CODE
- WARN_NONEXISTENT_METHOD_CALL
- WARN_INVALID_OPERATION
- WARN_CALL_WITH_TYPE_ERRORS
- WARN_RETURN_VALUE_IGNORED
- WARN_DEPRECATED
- WARN_DUPLICATE_HASH_KEY
- WARN_DUPLICATE_BLOCK_VARS

const Qore::WARN_DEPRECATED = QP_WARN_DEPRECATED

Enables a warning when deprecated code is used.

See Also
  "Deprecated" Functions

const Qore::WARN_DUPLICATE_BLOCK_VARS = QP_WARN_DUPLICATE_BLOCK_VARS

Enables a warning when a program declares a local variable more than once in the same block; note that this is not a warning but rather an error when assume-local or new-style parse options are set.

See Also
  duplicate-block-vars

const Qore::WARN_DUPLICATE_GLOBAL_VARS = QP_WARN_DUPLICATE_GLOBAL_VARS

Indicates that the embedded code has declared the same global variable more than once.

See Also
  duplicate-global-vars

const Qore::WARN_DUPLICATE_HASH_KEY = QP_WARN_DUPLICATE_HASH_KEY

Enables a warning when an immediate hash is declared and at least one of the keys is repeated.

See Also
  duplicate-hash-key

const Qore::WARN_DUPLICATE_LOCAL_VARS = QP_WARN_DUPLICATE_LOCAL_VARS

Enables a warning when a local variable with the same name is declared in a subblock (ie another local variable with the same name is reachable in the same lexical scope); note that this warning can raise false positives if the programmer is used to redeclaring the same variable names in subblocks.

See Also
  duplicate-local-vars and WARN_DUPLICATE_BLOCK_VARS

const Qore::WARN_EXCESS_ARGS = QP_WARN_EXCESS_ARGS

Enables a warning when a function or method call is made with more arguments than are used by the function or method.

See Also
  excess-args

const Qore::WARN_INVALID_OPERATION = QP_WARN_INVALID_OPERATION

Indicates that the embedded code performs some operation that is guaranteed to produce no result (for example, using the [] operator on an integer value)

See Also
  invalid-operation

const Qore::WARN_MODULES = QP_WARN_MODULES

The default warning mask for user modules.

This warning is made up of the following values combined with binary or:

- WARN_UNREACHABLE_CODE
- WARN_NONEXISTENT_METHOD_CALL
- WARN_INVALID_OPERATION
- WARN_CALL_WITH_TYPE_ERRORS
- WARN_RETURN_VALUE_IGNORED
- WARN_DUPLICATE_HASH_KEY
- WARN_DUPLICATE_BLOCK_VARS

const Qore::WARN_NONEXISTENT_METHOD_CALL = QP_WARN_NONEXISTENT_METHOD_CALL

Indicates that the embedded code is calling an unknown method in a class.

This warning may generate false positives; it may be vaild operation if the calling method is only called from a derived class that actually implements the method. In this case, the cast<> operator can be used to eliminate the warning.

See Also
  non-existent-method-call

const Qore::WARN_RETURN_VALUE_IGNORED = QP_WARN_RETURN_VALUE_IGNORED

Enables a warning when a function or method call is made with no side effects and the return value is ignored.

See Also
  return-value-ignored

const Qore::WARN_UNDECLARED_VAR = QP_WARN_UNDECLARED_VAR

Indicates that the embedded code referenced an undeclared variable that will be assumed to be a global variable.

See Also
  undeclared-var

const Qore::WARN_UNKNOWN_WARNING = QP_WARN_UNKNOWN_WARNING

Indicates that the embedded code tried to enable or disable an unknown warning.

See Also
  unknown-warning

const Qore::WARN_UNREACHABLE_CODE = QP_WARN_UNREACHABLE_CODE

Indicates that code cannot be reached (for example; code in the same local block after an unconditional return or thread_exit statement)

See Also
  unreachable-code

const Qore::WARN_UNREFERENCED_VARIABLE = QP_WARN_UNREFERENCED_VARIABLE

This warning is raised when a variable is declared in a block but never referenced.

See Also
  unreferenced-variable

const Qore::WARN_WARNING_MASK_UNCHANGED = QP_WARN_WARNING_MASK_UNCHANGED

This warning means that the embedded code tried to change the warning mask, but it was locked, so the warning mask was actually unchanged.

See Also
  warning-mask-unchanged