Qore Programming Language Reference Manual  0.9.3.2
Warning Constants

Variables

const Qore::WARN_ALL = QP_WARN_ALL
 Enables all warnings.
 
const Qore::WARN_BROKEN_LOGIC_PRECEDENCE = QP_WARN_BROKEN_LOGIC_PRECEDENCE
 This warns before expressions affected by %broken-logic-precedence. More...
 
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

◆ WARN_BROKEN_LOGIC_PRECEDENCE

const Qore::WARN_BROKEN_LOGIC_PRECEDENCE = QP_WARN_BROKEN_LOGIC_PRECEDENCE

This warns before expressions affected by %broken-logic-precedence.

See also
broken-logic-precedence
Since
Qore 0.8.12.11

◆ WARN_CALL_WITH_TYPE_ERRORS

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

◆ WARN_DEFAULT

◆ WARN_DEPRECATED

const Qore::WARN_DEPRECATED = QP_WARN_DEPRECATED

Enables a warning when deprecated code is used.

See also
Deprecated List

◆ WARN_DUPLICATE_BLOCK_VARS

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

◆ WARN_DUPLICATE_GLOBAL_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

◆ WARN_DUPLICATE_HASH_KEY

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

◆ WARN_DUPLICATE_LOCAL_VARS

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

◆ WARN_EXCESS_ARGS

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

◆ WARN_INVALID_OPERATION

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

◆ WARN_MODULES

const Qore::WARN_MODULES = QP_WARN_MODULES

◆ WARN_NONEXISTENT_METHOD_CALL

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

◆ WARN_RETURN_VALUE_IGNORED

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

◆ WARN_UNDECLARED_VAR

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

◆ WARN_UNKNOWN_WARNING

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

◆ WARN_UNREACHABLE_CODE

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

◆ WARN_UNREFERENCED_VARIABLE

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

◆ WARN_WARNING_MASK_UNCHANGED

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