This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Apply std errno patch of 2001-03-06 to 3.0 branch?


Would it be possible to apply the following to the branch as well?

2001-03-06  Nathan Myers  <ncm@cantrip.org>
            Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/c_std/bits/std_cerrno.h: Don't define errno in std::.
        * testsuite/17_intro/header_cerrno.cc (test01): New file.
        * testsuite/17_intro/header_cassert.cc (test01): New file.
        * testsuite/17_intro/header_cstddef.cc (test01): New file.
        * testsuite/17_intro/header_csetjmp.cc (test01): New file.
        * testsuite/17_intro/header_cstdarg.cc (test01): New file.


Without this, the following trivial piece of code fails (SPARC/Solaris8):

    #include <cerrno>
    using namespace std;
    int
    main()
    {
      int i = errno;
    }

with the following error message:

    errno-test.cc: In function `int main()':
    errno-test.cc:6: use of `errno' is ambiguous
    /usr/include/errno.h:41:   first declared as `int errno' here
    /scratch/local/gcc-3.0/include/g++-v3/bits/std_cerrno.h:44:   also
       declared as `int std::errno' here

    $ c++ -v
    Reading specs from
    /scratch/local/gcc-3.0/lib/gcc-lib/sparc-sun-solaris2.8/3.0/specs
    Configured with: ../../gcc3-cvs/configure
    --prefix=/scratch/local/gcc-3.0 --enable-threads --enable-shared
    --enable-c-mbchar -v
    gcc version 3.0 20010406 (prerelease)

Mainline works fine.

Regards,
Mumit



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]