[GCC-XML] static functions: no `static' attribute?
David Cole
david.cole at kitware.com
Thu Aug 19 08:59:11 EDT 2010
On Thu, Aug 19, 2010 at 8:55 AM, Brad King <brad.king at kitware.com> wrote:
> On 08/19/2010 07:23 AM, David Cole wrote:
> > Here is a sampling of the output of processing vtkWin32OutputWindow.h
> > with gccxml:
> >
> > <Method id="_17" name="IsTypeOf" returns="_64" static="1" context="_9"
> > access="public" mangled="_ZN20vtkWin32OutputWindow8IsTypeOfEPKc"
> > demangled="vtkWin32OutputWindow::IsTypeOf(char const*)" location="f1:35"
> > file="f1" line="35" endline="35" inline="1">
> > <Argument name="type" type="_7" location="f1:35" file="f1"
> line="35"/>
> > </Method>
> >
> > There is clearly a static="1" attribute on each static method, just as I
> > would expect.
>
> This is a class static method which is a different use of the "static"
> keyword. It affects the interface of the function (whether there is
> an implicit 'this' argument).
>
> > On Thu, Aug 19, 2010 at 12:17 AM, Óscar Fuentes <ofv at wanadoo.es
> > <mailto:ofv at wanadoo.es>> wrote:
> >
> > Qt have something like this on their headers:
> >
> > inline static int foo(int blah) { .... }
>
> This use of "static" affects linkage but not the function interface.
>
Ah. I was assuming the context of this line was inside a class
definition....
>
> > `inline' is reported, but not `static'.
> >
> > Is this a limitation of gcc-xml or a bug?
>
> It was never intended to work. It may be possible to implement but
> I do not know where GCC's parser keeps this information. Take a look
> at GCC/gcc/tree.h, GCC/gcc/cp/cp-tree.h, and GCC/gcc/cp/xml.c if you
> want to try it.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20100819/cfda6bad/attachment.html>
More information about the gccxml
mailing list