reusing the warning code for warnings in value contexts