declaration_t *next;
/** next declaration with same symbol */
declaration_t *symbol_next;
+ /** next variable/parameter in function scope/global scope */
+ declaration_t *next_var;
/* the following fields are used in ast2firm module */
unsigned char declaration_kind;
ref->declaration = declaration;
ref->expression.datatype = type;
+ /* this declaration is used */
+ declaration->used = true;
+
return expression;
}
OPT("switch-default", switch_default)
OPT("unknown-pragmas", unknown_pragmas)
OPT("unused-label", unused_label)
+ OPT("unused-parameter", unused_parameter)
+ OPT("unused-variable", unused_variable)
#if 0
OPTX("unused") {
SET(unused_function)
.switch_default = false,
.unknown_pragmas = true,
.unused_label = false,
+ .unused_parameter = false,
+ .unused_variable = false,
.unused_value = true
};
bool unused_function:1; /**< Warn whenever a static function is declared but not defined or a non-inline static function is unused */
#endif
bool unused_label:1; /**< Warn whenever a label is declared but not used */
-#if 0 // TODO
bool unused_parameter:1; /**< Warn whenever a function parameter is unused aside from its declaration */
bool unused_variable:1; /**< Warn whenever a local variable or non-constant static variable is unused aside from its declaration */
-#endif
bool unused_value:1; /**< Warn whenever a statement computes a result that is explicitly not used */
#if 0 // TODO
bool write_strings:1; /**< Give string constants the type 'const char[LENGTH]' so that copying the address of one into a 'char *' pointer will get a warning */