[cfe-dev] inline directive apparently ignored
Ruben Van Boxem
vanboxem.ruben at gmail.com
Sat Sep 24 09:35:37 PDT 2011
2011/9/24 Vinay Sajip <vinay_sajip at yahoo.co.uk>
> Given the source
>
> static __inline__ int F1(float x, double y);
> static __attribute__((__always_inline__)) int F2(float x, double y);
>
> The AST produced via libclang is
>
> F1 FunctionDecl FunctionProto
> x ParmDecl Float
> y ParmDecl Double
> F2 FunctionDecl FunctionProto
> UnexposedAttr 9 <-- the value of the AlwaysInline attribute
> x ParmDecl Float
> y ParmDecl Double
>
> Is there anything special one has to do to get clang to return the
> __inline__
> attribute?
>
> Thanks,
>
> Vinay Sajip
I came across a similar observation in libc++ when this attribute is used
for a vararg function: GCC produces an error, Clang was silent.
If Clang ignores this attribute, it should at least say so with a warning.
This can be a general: Warning: ignored unknown *attribute* attribute.
Ruben
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110924/d99faf8c/attachment.html>
More information about the cfe-dev
mailing list