+ {
+ int i;
+ for (i = 0; i < 2; ++i)
+ symbol_code_props_get (sym, i)->is_used = true;
+ }
+
+ /* Set the semantic type status associated to the current symbol to
+ 'declared' so that we could check semantic types unnecessary uses. */
+ if (sym->type_name)
+ {
+ semantic_type *sem_type = semantic_type_get (sym->type_name, NULL);
+ if (sem_type)
+ sem_type->status = declared;
+ }
+
+ return true;
+}
+
+static inline bool
+semantic_type_check_defined (semantic_type *sem_type)
+{
+ /* <*> and <> do not have to be "declared". */
+ if (sem_type->status == declared
+ || !*sem_type->tag
+ || STREQ(sem_type->tag, "*"))
+ {
+ int i;
+ for (i = 0; i < 2; ++i)
+ if (sem_type->props[i].kind != CODE_PROPS_NONE
+ && ! sem_type->props[i].is_used)
+ complain (&sem_type->location, Wother,
+ _("useless %s for type <%s>"),
+ code_props_type_string (i), sem_type->tag);
+ }
+ else
+ complain (&sem_type->location, Wother,
+ _("type <%s> is used, but is not associated to any symbol"),
+ sem_type->tag);
+