@@ -203,8 +203,6 @@ static void sym_calc_visibility(struct symbol *sym)
sym->visible = tri;
sym_set_changed(sym);
}
- if (sym_is_choice_value(sym))
- return;
/* defaulting to "yes" if no explicit "depends on" are given */
tri = yes;
if (sym->dir_dep.expr)
@@ -235,9 +233,23 @@ static void sym_calc_visibility(struct symbol *sym)
struct symbol *sym_choice_default(struct symbol *sym)
{
struct symbol *def_sym;
+ struct symbol *ret = NULL;
struct property *prop;
struct expr *e;
+ /* check to see if any are selected */
+ prop = sym_get_choice_prop(sym);
+ expr_list_for_each_sym(prop->expr, e, def_sym)
+ if (def_sym->rev_dep.tri != no) {
+ if (ret)
+ fprintf(stderr, "warning: conflicting selects "
+ "on choice block: %s\n", sym->name);
+ else
+ ret = def_sym;
+ }
+ if (ret)
+ return ret;
+
/* any of the defaults visible? */
for_all_defaults(sym, prop) {
prop->visible.tri = expr_calc_value(prop->visible.expr);