From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9056 invoked by alias); 21 Jun 2010 14:26:26 -0000 Received: (qmail 8985 invoked by uid 48); 21 Jun 2010 14:26:14 -0000 Date: Mon, 21 Jun 2010 14:26:00 -0000 Subject: [Bug c++/44611] New: Including and hides ::signbit function X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "gnu at bluedreamer dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg02042.txt.bz2 When both of these files are included - compiler cannot locate c global signbit function. adrianc@dluadrianc:~/gcc_bug> g++ signbit.cc signbit.cc: In function 'int main(int, char**)': signbit.cc:18:42: error: 'signbit' was not declared in this scope #include #include #include int main(int argc, char *argv[]) { float a=12.4234; float b=-123.4333; #ifdef _XOPEN_SOURCE std::cout << "_XOPEN_SOURCE=" << _XOPEN_SOURCE << std::endl; #endif #ifdef _ISOC99_SOURCE std::cout << "_ISOC99_SOURCE is here\n"; #endif std::cout << "signbit a=" << signbit(a) << std::endl; std::cout << "signbit b=" << signbit(b) << std::endl; return 0; } adrianc@dluadrianc:~/gcc_bug> gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc-4.5.0/configure --enable-__cxa_atexit --enable-languages=c,c++ --enable-threads --with-cpu=core2 --disable-nls --with-arch=i686 --with-mpfr=/usr/local --with-gmp=/usr/local --with-mpc=/usr/local --with-build-time-tools=/usr/local --enable-lto Thread model: posix gcc version 4.5.0 (GCC) -- Summary: Including and hides ::signbit function Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gnu at bluedreamer dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44611