From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27874 invoked by alias); 9 Sep 2012 17:20:14 -0000 Received: (qmail 27856 invoked by uid 22791); 9 Sep 2012 17:20:12 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 09 Sep 2012 17:20:00 +0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/54451] c++11/random.cc build failure when _GLIBCXX_USE_C99_STDINT_TR1 is not defined in config.h Date: Sun, 09 Sep 2012 17:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg00720.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54451 --- Comment #5 from Jonathan Wakely 2012-09-09 17:19:44 UTC --- (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 are not declared, so code using them won't compile. Using #error would prevent #include 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 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.