[LLVMbugs] [Bug 17146] New: LLVM Toolset fails to correctly parse bitset header

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Sep 7 03:20:21 PDT 2013


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

            Bug ID: 17146
           Summary: LLVM Toolset fails to correctly parse bitset header
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: wolfeinstein at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The VC11 bitset header fails to parse with Clang. Here is the offending code:


 #define _BITSET_SIZE_TYPE    \
    typename basic_string<_Elem, _Tr, _Alloc>::size_type

    template<class _Elem,
        class _Tr,
        class _Alloc>
        explicit bitset(const basic_string<_Elem, _Tr, _Alloc>& _Str, // line
166
            _BITSET_SIZE_TYPE _Pos = 0,
            _BITSET_SIZE_TYPE _Count = basic_string<_Elem, _Tr, _Alloc>::npos,
            _Elem _E0 = (_Elem)'0',
            _Elem _E1 = (_Elem)'1')
        {    // construct from [_Pos, _Pos + _Count) elements in string
        _Construct(_Str, _Pos, _Count, _E0, _E1);
        }

VC accepts this code without complaint, and I don't see any errors.

The given error is

1>  G:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\bitset:168:62: error: expected ')'
1>                          _BITSET_SIZE_TYPE _Count = basic_string<_Elem, _Tr,
_Alloc>::npos,
1>                                                                             
      ^
1>  G:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\bitset:166:18: note: to match this '('
1>                  explicit bitset(const basic_string<_Elem, _Tr, _Alloc>&
_Str,
1>                                 ^
1>  G:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\bitset:168:49: error: expected '>'
1>                          _BITSET_SIZE_TYPE _Count = basic_string<_Elem, _Tr,
_Alloc>::npos,
1>                                                                       ^
1>  G:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\bitset:168:54: error: missing default argument on parameter
1>                          _BITSET_SIZE_TYPE _Count = basic_string<_Elem, _Tr,
_Alloc>::npos,
1>                                                                            ^
1>  G:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\include\bitset:168:62: error: missing default argument on parameter
1>                          _BITSET_SIZE_TYPE _Count = basic_string<_Elem, _Tr,
_Alloc>::npos,
1>                                                                             
      ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130907/2c5cbb04/attachment.html>


More information about the llvm-bugs mailing list