def _remove_code(code, parameters):
    """Remove code that should not be generated."""
    for key in code:
        flag = 'no-' + key
        if flag in parameters and parameters[flag]:
            msg = '// Function %s not generated (compiled with -f%s)' % (key,
                flag)
            code[key] = format['exception'](msg)
