Issue Details (XML | Word | Printable)

Key: STDCXX-637
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Farid Zaripov
Reporter: Farid Zaripov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[_MSC_VER] 21.cwchar test fails

Created: 02/Nov/07 03:30 PM   Updated: 26/Feb/08 03:10 PM
Component/s: Tests
Affects Version/s: 4.2.0
Fix Version/s: 4.2.1

Time Tracking:
Not Specified

Environment: MSVC, ICC/Windows
Issue Links:
Reference
 

Severity: Incorrect Behavior
Resolution Date: 22/Nov/07 05:39 PM


 Description  « Hide
The 21.cwchar.cpp test fails with the following assertions:

-----------

  1. ASSERTION (S7) (4 lines):
  2. TEXT: masking macro getwc unexpectedly defined
  3. CLAUSE: lib.c.strings
  4. LINE: 512
  1. ASSERTION (S7) (4 lines):
  2. TEXT: masking macro putwc unexpectedly defined
  3. CLAUSE: lib.c.strings
  4. LINE: 512
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::wcstok() not declared (_RWSTD_NO_WCSTOK = 0, _RWSTD_NO_WCSTOK_IN_LIBC = 0)
  3. CLAUSE: lib.c.strings
  4. LINE: 916
    -----------

Also there are another assertions (see below), but I think these assertions should be avoided when _RWSTD_NO_XXX == 1 && _RWSTD_NO_XXX_IN_LIBC == 1

-----------

  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::btowc() not declared (_RWSTD_NO_BTOWC = 1, _RWSTD_NO_BTOWC_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 942
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::wctob() not declared (_RWSTD_NO_WCTOB = 1, _RWSTD_NO_WCTOB_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 943
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::mbrlen() not declared (_RWSTD_NO_MBRLEN = 1, _RWSTD_NO_MBRLEN_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 948
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::mbrtowc() not declared (_RWSTD_NO_MBRTOWC = 1, _RWSTD_NO_MBRTOWC_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 949
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::wcrtomb() not declared (_RWSTD_NO_WCRTOMB = 1, _RWSTD_NO_WCRTOMB_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 950
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::mbsrtowcs() not declared (_RWSTD_NO_MBSRTOWCS = 1, _RWSTD_NO_MBSRTOWCS_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 952
  1. ASSERTION (S7) (4 lines):
  2. TEXT: std::wcsrtombs() not declared (_RWSTD_NO_WCSRTOMBS = 1, _RWSTD_NO_WCSRTOMBS_IN_LIBC = 1)
  3. CLAUSE: lib.c.strings
  4. LINE: 953
    -----------


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 03/Nov/07 12:06 AM
I'm not what the best approach to the first set of assertions (the ones for the shadow macros) is. The macros are usually provided for efficiency and rarely cause problems so I don't feel comfortable #undefining them just to satisfy strict conformance requirements and penalizing programs that don't run into any name clashes because of them. One option for dealing with them might be to undefine the macros in strict mode and leaving them alone otherwise (and doing the same in the test – i.e., adjust the strictness of the test based on the strictness of the library).

As for the rest of the assertions (i.e., those for the undefined symbols), unless there actually is something we can do about them (e.g., provide our own definitions), I think replacing the assertions with warnings might be the way to go.


Farid Zaripov added a comment - 26/Feb/08 03:10 PM
Closing the resolved issue.