http://llvm.org/bugs/show_bug.cgi?id=20708

            Bug ID: 20708
           Summary: Possible false positive in undefined-inline with
                    __alloctr_rebind_helper
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Hi,

with the attached file.h (excerpt of bits/alloc_traits.h from libstdc++ of GCC
4.9.1) and clang r212179 I get

$ clang -Wall -fsyntax-only -x c++ -std=c++11 file.h
file.h:28:3: warning: inline function '__alloctr_rebind_helper<int,
float>::_S_chk<int, float>' is not defined [-Wundefined-inline]
                _S_chk(...);
                ^
file.h:31:32: note: used here
              using __type = decltype(_S_chk<_Alloc, _Tp>(nullptr));
                                      ^
1 warning generated.

I don't think decltype should require a definition; I don't see how a
definition could change the decltype. It compiles just fine without the
warning.

As I said this happens in the wild with libstdc++ of GCC 4.9.1 (installed side
by side to the system compiler version) - where we still need to figure out why
clang thinks they are not system headers. But that shouldn't affect this issue.

Thanks!

Axel.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to