This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/54451] c++11/random.cc build failure when _GLIBCXX_USE_C99_STDINT_TR1 is not defined in config.h


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54451

rbmj at verizon dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rbmj at verizon dot net

--- Comment #1 from rbmj at verizon dot net 2012-09-09 02:36:26 UTC ---
I can confirm that the build fails as reported.

A bit of searching - turns out that acinclude.m4 has the following:

if test x"$glibcxx_cv_c99_stdint_tr1" = x"yes"; then
  AC_DEFINE(_GLIBCXX_USE_C99_STDINT_TR1, 1,
            [Define if C99 tyeps in <stdint.h> should be imported in
             <tr1/cstdint> in namespace std::tr1.])
fi

This is confirmed in include/tr1/cstdint:

#ifdef _GLIBCXX_USE_C99_STDINT_TR1

namespace std _GLIBCXX_VISIBILITY(default)
{
namespace tr1
{
  using ::int8_t;
  using ::int16_t;

etc.  However, this is also in include/c_global/cstdint:

#ifdef _GLIBCXX_USE_C99_STDINT_TR1

namespace std
{
  using ::int8_t;
  using ::int16_t;

etc.  Those are the only uses of it in code that I can find.  It seems like it
isn't exactly the best name for the define (it no longer just applies to TR1),
but it doesn't do too much.  I can't think of a case where this would not be
desired behavior (I don't remember, but I *think* that the C++ standard says
that those typenames should be in the standard namespace).

Anyway, it doesn't appear like removing that code will have any adverse
effects.

The relevant code is coming from revision 150312 (written by Paolo Carlini in
2009).  Since this just broke, I'm *guessing* that this is because of 4.8
moving more towards c++11, and because it was thought that this define was only
for tr1, it was removed from a default define set *somewhere* (I'm too scared
to venture too far into the build system...).  I can't seem to find any
evidence of this though... I know it worked ~3 months ago, but my git foo can't
seem to find the change.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]