Re: [patch] add G_GNUC_WARNUNCHECKED define


Johannes Stezenbach <js convergence de> writes:

> Well, IMHO is is not legitimate to ignore the return value
> of g_list_append() etc. because the documented API requires
> that it is evaluated. OTOH I think it is not legitimate to
> depend on undocumented implementation internals.

GList and GSList don't have any internals. There are no implementation
details that the user is not supposed to know about.

> My guess is that adding G_GNUC_WARNUNCHECKED to the list functions
> might uncover a few real bugs, and save people lots of time in bug
> hunting.

It would cause lots of unneeded compiler warnings and break
compilation of apps using -Werror. I don't think that's an option.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]