[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#526601: fails to use C99 isinfity macros causing compile failure



Package: libstdc++6-4.3-dev
Version: 4.3.3-8
Severity: important

This trivial piece of code fails to compile with g++:

#include <math.h>
#include <cmath>

int main(int argc, char** argv)
{
    int i=isnan(argc);
    i+= isinf(argc);
    i+= isfinite(argc);
}

The reason seems to be that /usr/include/c++/4.3/tr1_impl/cmath is not included from /usr/include/c++/4.3/cmath.

at least when I am manually adding the relevant lines to the code things work fine:

#include <math.h>
#include <cmath>

#if _GLIBCXX_USE_C99_MATH
#if !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC

  /// Function template definitions [8.16.3].
  using std::signbit;

  using std::fpclassify;

  using std::isfinite;
  using std::isinf;
  using std::isnan;
  using std::isnormal;

  using std::isgreater;
  using std::isgreaterequal;
  using std::isless;
  using std::islessequal;
  using std::islessgreater;
  using std::isunordered;
#endif
#endif


int main(int argc, char** argv)
{
    int i=isnan(argc);
    i+= isinf(argc);
    i+= isfinite(argc);
}


-- System Information:
Debian Release: squeeze/sid
  APT prefers stable
  APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable'), (500, 'oldstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-rc3-sonne (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libstdc++6-4.3-dev depends on:
ii  g++-4.3                       4.3.3-8    The GNU C++ compiler
ii  gcc-4.3-base                  4.3.3-8    The GNU Compiler Collection (base 
ii  libc6-dev                     2.9-8      GNU C Library: Development Librari
ii  libstdc++6                    4.3.3-8    The GNU Standard C++ Library v3

libstdc++6-4.3-dev recommends no packages.

Versions of packages libstdc++6-4.3-dev suggests:
pn  libstdc++6-4.3-doc            <none>     (no description available)

-- no debconf information



Reply to: