public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "gnu at bluedreamer dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/44611] New: Including <math,h> and <cmath> hides ::signbit function Date: Mon, 21 Jun 2010 14:26:00 -0000 [thread overview] Message-ID: <bug-44611-14836@http.gcc.gnu.org/bugzilla/> (raw) 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 <iostream> #include <math.h> #include <cmath> 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 <math,h> and <cmath> 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
next reply other threads:[~2010-06-21 14:26 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-21 14:26 gnu at bluedreamer dot com [this message] 2010-06-21 14:31 ` [Bug c++/44611] " gnu at bluedreamer dot com 2010-06-21 14:31 ` gnu at bluedreamer dot com 2010-06-21 14:32 ` gnu at bluedreamer dot com 2010-06-21 14:44 ` [Bug c++/44611] Including <math.h> " paolo dot carlini at oracle dot com 2010-06-21 14:52 ` [Bug libstdc++/44611] " redi at gcc dot gnu dot org 2010-06-21 15:41 ` paolo dot carlini at oracle dot com 2010-06-21 15:56 ` redi at gcc dot gnu dot org 2010-06-21 16:03 ` paolo dot carlini at oracle dot com 2010-06-21 16:08 ` [Bug c++/44611] " gnu at bluedreamer dot com 2010-06-21 16:12 ` redi at gcc dot gnu dot org 2010-06-21 16:20 ` gnu at bluedreamer dot com 2010-06-21 16:28 ` redi at gcc dot gnu dot org 2010-06-21 16:31 ` gnu at bluedreamer dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-44611-14836@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).