Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-153

[NetBSD 3.0] error on toupper in loc/_punct.cc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.1.4
    • 4.1.4
    • 22. Localization
    • None
    • gcc version 3.3.3 (NetBSD nb3 20040520)
      NetBSD 3.0

    Description

      When building the test suite driver, the build fails with the following error

      gcc -c -I/house/ablackrw/stdcxx/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/tmp/ablackrw/stdcxx-11d/include -I/house/ablackrw/stdcxx/include -I/house/ablackrw/stdcxx/../rwtest -I/house/ablackrw/stdcxx/tests/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /house/ablackrw/stdcxx/tests/src/printf.cpp
      In file included from /house/ablackrw/stdcxx/include/loc/_punct.h:153,
      from /house/ablackrw/stdcxx/include/loc/_numpunct.h:36,
      from /house/ablackrw/stdcxx/include/loc/_num_get.cc:25,
      from /house/ablackrw/stdcxx/include/loc/_num_get.h:281,
      from /house/ablackrw/stdcxx/include/ostream:35,
      from /house/ablackrw/stdcxx/include/istream:31,
      from /house/ablackrw/stdcxx/include/iostream:26,
      from /house/ablackrw/stdcxx/tests/src/printf.cpp:56:
      /house/ablackrw/stdcxx/include/loc/_punct.cc: In function `_InputIter
      _rw::_rw_match_name(_InputIter, _InputIter, const _CharT* const*, const
      unsigned int*, unsigned int, unsigned int&, int&, std::ios_base*)':
      /house/ablackrw/stdcxx/include/loc/_punct.cc:89: error: parse error before `('
      token
      /house/ablackrw/stdcxx/include/loc/_punct.cc:90: error: parse error before `('
      token
      /house/ablackrw/stdcxx/include/iostream: At top level:
      /house/ablackrw/stdcxx/tests/src/printf.cpp:2176: warning: `int
      _rw_fmtmask(const FmtSpec&, char*, size_t, int)' defined but not used

      Looking at the translation unit in question, the content after preprocessing has completed is
      Traits::eq (ctp->((int)((_toupper_tab + 1)[(__names [__k][__pos])])),
      _ctp->((int)((_toupper_tab + 1)[(__ch)])))

      It appears to me that what is happening is that something is #defining toupper , but I have not determined where that is coming from.

      Attachments

        Activity

          People

            sebor Martin Sebor
            ablack-rw Andrew Black
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: