http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54451
--- Comment #6 from rbmj at verizon dot net 2012-09-09 18:08:11 UTC --- Making local changes to bring stdint.h into compliance works for me as well. (In reply to comment #5) > (In reply to comment #4) > > Maybe it would be nice to use #error in header file to inform the user that > > this feature is not supported for target system (nicer than to get linker > > error > > later) > > You won't get a linker error, if the macro is not defined then the types in > <random> are not declared, so code using them won't compile. However, you will get weird "std::random_device" not declared errors, which will seem strange to any end user. > Using #error would prevent #include <random> which I don't think is a good > idea. There's no harm including the header as long as you don't try to use > types which require a working <stdint.h> Agreed. But could we use #warning to tell the user what's happening (if portability is an issue we can check for __GNUC__) without going through the source? > The fix is to simply make random.cc check the macro. This is what we already > do > in future.cc and thread.cc and mutex.cc and other files too. Also true.