X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/56beb0d2b20edc2f0ac8716c020053f8a103577d..3e833eea9cb9822f04c639e143212c4b6f7940d4:/src/checks.c diff --git a/src/checks.c b/src/checks.c index cccdedb..c651e9a 100644 --- a/src/checks.c +++ b/src/checks.c @@ -478,6 +478,30 @@ check_func_arg_checks(Class *c) } } +void +check_func_attrs(Class *c) +{ + GList *li; + for (li = c->nodes; li != NULL; li = li->next) { + Node *n = li->data; + if (n->type == METHOD_NODE) { + Method *m = (Method *)n; + if ((m->method == INIT_METHOD || + m->method == CLASS_INIT_METHOD) + && (m->funcattrs != NULL && strlen(m->funcattrs) != 0)) { + /* This is actually dead code at the moment, since the parser + doesn't accept attributes to the init or class_init + syntactic forms anyway. But it could easily be made to do + so, and also for virtual override and signal methods, and + then we could give kinder error messages here. */ + error_print (GOB_ERROR, m->line_no, + "function attributes (G_GNUC_PRINTF, etc.) aren't " + "supported for the init or class_init methods"); + } + } + } +} + void check_for_class_destructors (Class *c) {