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

             Bug #: 14585
           Summary: static const data memebers each with a initializer but
                    not defined out of class body
           Product: libc++
           Version: 3.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 9682
  --> http://llvm.org/bugs/attachment.cgi?id=9682
test_files

Last month, I used clang++3.2 + libcxx + libcxxabi compiling the testsuites of
STLport-5.2.1 on linux, I found a problem involving some static const data
memebers of class numeric_limits each with a initializer but not defined out of
class body, so it caused link error: undefined reference to
`std::__1::numeric_limits<int>::is_specialized'.

Later I reported it at clang developer forum:
http://clang-developers.42468.n3.nabble.com/libcxx-problem-involving-static-const-data-members-of-class-numeric-limits-td4028564.html

Now I find some other same bugs, it involved the following classes:
<chrono>:
    chrono::system_clock
    chrono::steady_clock
<limits>:
    numeric_limits
<__locale>:
    locale
    ctype_base
<locale>:
    moneypunct
<random>:
    linear_congruential_engine
    mersenne_twister_engine
    subtract_with_carry_engine
    discard_block_engine
    shuffle_order_engine
<regex>:
    basic_regex

I have written some test files in the attachment.
And a fixed patch file in another attachment later.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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