public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44611]  New: Including <math,h> and <cmath> hides ::signbit function
@ 2010-06-21 14:26 gnu at bluedreamer dot com
  2010-06-21 14:31 ` [Bug c++/44611] " gnu at bluedreamer dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: gnu at bluedreamer dot com @ 2010-06-21 14:26 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-06-21 16:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21 14:26 [Bug c++/44611] New: Including <math,h> and <cmath> hides ::signbit function gnu at bluedreamer dot com
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

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).