C++ Standard Library
  1. C++ Standard Library
  2. STDCXX-763

[LWG #231] Inconsistency between LWG issue 231 and src/punct.cpp.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: 22. Localization
    • Labels:
      None
    • Environment:

      All

    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      For additional information see this thread:
      http://www.mail-archive.com/dev@stdcxx.apache.org/msg00213.html

      The proposed patch below:

      Index: src/punct.cpp
      ===================================================================
      --- src/punct.cpp       (revision 631177)
      +++ src/punct.cpp       (working copy)
      @@ -619,9 +619,7 @@
               const int fltfld = fmtflags & _RWSTD_IOS_FLOATFIELD;
       
               // follows resolution of lwg issue 231
      -        if (   (   _RWSTD_IOS_FIXED      == fltfld
      -                || _RWSTD_IOS_SCIENTIFIC == fltfld)
      -            && prec >= 0 || prec > 0) {
      +        if (0 <= prec) {
       
                   // 7.19.6.1, p5 of C99 specifies that, when given using the
                   // asterisk, negative precision is treated the same as if
      

        Activity

        Hide
        Farid Zaripov added a comment -
        Show
        Farid Zaripov added a comment - Fixed thus: http://svn.apache.org/viewvc?rev=637393&view=rev 22.locale.num.put.cpp test corrected thus: http://svn.apache.org/viewvc?rev=637392&view=rev
        Hide
        Farid Zaripov added a comment - - edited

        The issue will be closed after merging the changes in 4.2.x branch.

        Show
        Farid Zaripov added a comment - - edited The issue will be closed after merging the changes in 4.2.x branch.
        Hide
        Martin Sebor added a comment -

        Capitalized LWG in Summary according to convention.

        Show
        Martin Sebor added a comment - Capitalized LWG in Summary according to convention.
        Hide
        Farid Zaripov added a comment -

        All changes are merged in 4.2.x branch thus: http://svn.apache.org/viewvc?view=rev&revision=648752

        Show
        Farid Zaripov added a comment - All changes are merged in 4.2.x branch thus: http://svn.apache.org/viewvc?view=rev&revision=648752

          People

          • Assignee:
            Farid Zaripov
            Reporter:
            Farid Zaripov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 1h
              1h

                Development