Re: pre-summit introspection status



On Thu, Oct 9, 2008 at 9:34 PM, Behdad Esfahbod <behdad behdad org> wrote:
>
> But most recently I was reading the static analysis literature and came across
> the idea of using gcc user-attributes for source code annotation.  Take the
> above example, then one can define:
>
> #define G_IR_ARRAY __attribute__((user(g_ir_array)))
>
> On the face, it's not much different from what I proposed earlier.  However,
> it has an immense power: you can use gcc or gcc-compatible frontends.

Well, using gcc as a parser is problematic
(http://lwn.net/Articles/301135/).  Right now we have a custom parser
that generally works.  Not that it doesn't have its limitations but it
would be a lot of work to replace.

> Moreover, you can write static analyzers that check, for example, that the
> array is not shorter than its claimed length.  The possibilities are uncountable.

Well, one could also modify the static analyzer to understand the
gtk-doc annotations.  I'm not sure - I don't have a strong opinion on
this.  The plan is to make a decision on at the summit, we'll discuss
this proposal there.


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