[cfe-dev] clang ignoring global function declaration depending on include/declaration order

David Blaikie dblaikie at gmail.com
Sun Jun 12 22:26:14 PDT 2011


>
> Cédric Venet <cedric.venet at laposte.net>
> writes:
> > // this only work on gcc (and most compiler other than clang):
> > template<class T> int bar2(T a) { return a+foo2(); }
> > int foo2();
>
> This actually _doesn't_ work with any version of g++ I have (4.1 - 4.7):
>

Indeed - I expect the only thing, if anything, that accepts this is
Microsoft's C++ compiler (it's missing the whole two-phase lookup thing
entirely).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110612/5897fda4/attachment.html>


More information about the cfe-dev mailing list