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

[VAC++ 7.0.0.3] conflicting declaration of std::abs in <cmath> and <cstdlib>

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3
    • 26. Numerics
    • None
    • VisuaAge C++ 7.0.0.3

    Description

      The test case below fails to compile with the August 2005 patch of VAC++ 7.0 (7.0.0.3).

      $ xlC -qversion
      IBM XL C/C++ Enterprise Edition V7.0
      Version: 07.00.0000.0003

      $ cat t.cpp && nice gmake t
      #include <cmath>
      #include <cstdlib>

      int main ()
      {
      std::abs (0);
      }

      xlCcore_r -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/vacpp-7.0.0.3-15S/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/../rwtest -I/build/sebor/dev/stdlib/../rwtest/include -I/build/sebor/dev/stdlib/tests/include -g -q64 -qtemplateregistry=t.ti t.cpp
      "/build/sebor/dev/stdlib/include/ansi/cstdlib", line 208.16: 1540-0400 (S) "std::abs(int)" has a conflicting declaration.
      "/build/sebor/dev/stdlib/include/ansi/cmath", line 811.1: 1540-0424 (I) "abs" is declared on line 811 of "/build/sebor/dev/stdlib/include/ansi/cmath".
      "/build/sebor/dev/stdlib/include/ansi/cmath", line 770.1: 1540-0424 (I) "abs" is declared on line 770 of "/build/sebor/dev/stdlib/include/ansi/cmath".
      "/build/sebor/dev/stdlib/include/ansi/cmath", line 567.1: 1540-0424 (I) "abs" is declared on line 567 of "/build/sebor/dev/stdlib/include/ansi/cmath".
      gmake: *** [t.o] Error 1

      Attachments

        Activity

          People

            sebor Martin Sebor
            sebor Martin Sebor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: