https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124930

            Bug ID: 124930
           Summary: libcpp/charset.cc:843: Possible cut'n'paste error ?
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Source code is:

      if (pfile->wide_cset_desc.func == convert_using_iconv)
        iconv_close (pfile->wide_cset_desc.cd);
      if (pfile->reverse_narrow_cset_desc.func == convert_using_iconv)
        iconv_close (pfile->narrow_cset_desc.cd);
      if (pfile->reverse_utf8_cset_desc.func == convert_using_iconv)
        iconv_close (pfile->utf8_cset_desc.cd);

The last two look wrong. git blame says:

4b0e94b394fa libcpp/charset.cc (Marek Polacek        2026-01-14 11:37:39 -0500 
843)       if (pfile->reverse_narrow_cset_desc.func == convert_using_iconv)
4b0e94b394fa libcpp/charset.cc (Marek Polacek        2026-01-14 11:37:39 -0500 
844)    iconv_close (pfile->narrow_cset_desc.cd);
4b0e94b394fa libcpp/charset.cc (Marek Polacek        2026-01-14 11:37:39 -0500 
845)       if (pfile->reverse_utf8_cset_desc.func == convert_using_iconv)
4b0e94b394fa libcpp/charset.cc (Marek Polacek        2026-01-14 11:37:39 -0500 
846)    iconv_close (pfile->utf8_cset_desc.cd);

Reply via email to