17.3.1 ‘XXX’undeclared (first use in this function)