Informix Error -33011: Current declaration of variable-name hides previous declaration.
Cause and resolution
Current declaration of variable-name hides previous declaration.
This message is a warning from the preprocessor. The specified variable was declared more than once in the current scope. Compilation continues using this latest declaration to the end of the current scope. If you did not intend to redeclare the indicated variable, check the spelling of variable names and the syntax of declarations. In IBM Informix ESQL/C, this warning can also be issued if the variable is used as function parameter. In this case, use the PARAMETER clause.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-33011 is a preprocessor warning — per the official guidance, a variable was declared more than once in the current scope; compilation continues using the latest declaration through the end of that scope. In ESQL/C specifically, this warning can also fire when a variable is used as a function parameter.
- A variable redeclared within the same scope, per the official guidance — the direct, only cause.
- In ESQL/C, a variable used as a function parameter without the
PARAMETERclause, per the official guidance — a specific case of the same warning.
Solutions / Resolution
- If the redeclaration is unintentional, check variable-name spelling and declaration syntax, per the official guidance.
- In ESQL/C, use the
PARAMETERclause for variables used as function parameters, per the official guidance, if that's the actual cause.
Examples
N/A
No specific triggering statement is documented beyond a variable redeclared in the same scope.
Diagnostic Checks
- Check for an unintentional duplicate declaration of the named variable in the
current scope, and, in ESQL/C, check whether it's used as a function parameter without
PARAMETER.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -33011 in this set yet.
A variable was declared twice in the same scope (compilation continues with the latest
declaration) — check for an unintended redeclaration, or a missing PARAMETER clause in
ESQL/C.