http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51932
Bug #: 51932
Summary: Cannot use std::errno with <cerrno>
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
Attempting to use `std::errno' while including <cerrno> does not work and
results in an error.
Examples:
$ cat | g++ -xc++ - -o -
#include <cerrno>
int main()
{ return std::errno; }
^D<stdin>: In function ‘int main()’:
<stdin>:3:15: error: expected unqualified-id before ‘(’ token
$ cat | i686-w64-mingw32-g++ -xc++ - -o -
#include <cerrno>
int main()
{ return std::errno; }
^D<stdin>: In function ‘int main()’:
<stdin>:3:15: error: expected unqualified-id before ‘(’ token
$ cat | x86_64-w64-mingw32-g++ -xc++ - -o -
#include <cerrno>
int main()
{ return std::errno; }
^D<stdin>: In function ‘int main()’:
<stdin>:3:15: error: expected unqualified-id before ‘(’ token
gcc -v:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/kotarou3/usr/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../mingw/gcc-src/configure
--prefix=/home/kotarou3/work/gcc-build/../gcc
--with-gmp=/home/kotarou3/work/gcc-build/../mingw/gmp
--with-mpfr=/home/kotarou3/work/gcc-build/../mingw/mpfr
--with-mpc=/home/kotarou3/work/gcc-build/../mingw/mpc --enable-languages=c,c++
--disable-win32-registry --enable-checking=release --enable-shared
Thread model: posix
gcc version 4.7.0 20111231 (experimental) (GCC)
i686-w64-mingw32 -v:
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/i686-w64-mingw32/4.7.0/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../gcc-src/configure --target=i686-w64-mingw32
--prefix=/home/kotarou3/work/mingw/MinGW
--with-gmp=/home/kotarou3/work/mingw/gmp
--with-mpfr=/home/kotarou3/work/mingw/mpfr
--with-mpc=/home/kotarou3/work/mingw/mpc --enable-languages=c,c++
--disable-win32-registry --enable-checking=release --disable-shared
--disable-multilib
Thread model: win32
gcc version 4.7.0 20111231 (experimental) (GCC)
x86_64-w64-mingw32 -v:
Using built-in specs.
COLLECT_GCC=x86_64-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-w64-mingw32/4.7.0/lto-wrapper
Target: x86_64-w64-mingw32
Configured with: ../gcc-src/configure --target=x86_64-w64-mingw32
--prefix=/home/kotarou3/work/mingw/MinGW
--with-gmp=/home/kotarou3/work/mingw/gmp
--with-mpfr=/home/kotarou3/work/mingw/mpfr
--with-mpc=/home/kotarou3/work/mingw/mpc --enable-languages=c,c++
--disable-win32-registry --enable-checking=release --disable-shared
--disable-multilib
Thread model: win32
gcc version 4.7.0 20111231 (experimental) (GCC)