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

[gcc 4/Mac OS X] localedef error on macro tolower

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.1.2, 4.1.3, 4.1.4
    • Fix Version/s: 4.2.0
    • Component/s: Utilities
    • Labels:
      None
    • Severity:
      Compiler Error

      Description

      The localedef (and locale) utilities fail to compile with gcc 4 on Mac OS X in optimized mode with the error below:

      $ nice make BUILDTYPE=12d BUILDDIR=/build/sebor/stdcxx-gcc-4.0.1-12d
      GNUmakefile:309: "CONFIG not specified, using gcc.config"
      creating BUILDDIR=/build/sebor/stdcxx-gcc-4.0.1-12d
      generating /build/sebor/stdcxx-gcc-4.0.1-12d/makefile.in from /Users/sebor/stdcxx/etc/config/gcc.config
      make config

      configuring stdcxx 4.2.0 for gcc-4.0.1 on darwin-8.7.1-i386

      checking if the compiler is sane ok (invoked with gcc)
      checking if the linker is sane ok (invoked with gcc)
      checking system architecture ILP32 little endian
      ...
      gcc -c -I/Users/sebor/stdcxx/include/ansi -I/Users/sebor/stdcxx/include -I/build/sebor/stdcxx-gcc-4.0.1-12d/include -pedantic -nostdinc++ -O2 -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /Users/sebor/stdcxx/util/aliases.cpp
      /Users/sebor/stdcxx/util/aliases.cpp:352:46: error: macro "tolower" passed 2 arguments, but takes just 1
      /Users/sebor/stdcxx/util/aliases.cpp:353:46: error: macro "tolower" passed 2 arguments, but takes just 1
      /Users/sebor/stdcxx/util/aliases.cpp: In function 'int ci_pre_compare(const std::string&, const std::string&)':
      /Users/sebor/stdcxx/util/aliases.cpp:353: error: invalid operands of types '<unknown type>' and '<unknown type>' to binary 'operator!='
      make[2]: *** [aliases.o] Error 1
      make[1]: *** [util] Error 2
      make: *** [libstd] Error 2

        Attachments

          Activity

            People

            • Assignee:
              sebor Martin Sebor
              Reporter:
              sebor Martin Sebor
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: