public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/52680] New: std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP
@ 2012-03-23  1:49 mkline at cs dot wisc.edu
  2012-03-23 13:17 ` [Bug c++/52680] " redi at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: mkline at cs dot wisc.edu @ 2012-03-23  1:49 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52680
           Summary: std::this_thread::sleep_for #ifdef'd out by
                    _GLIBCXX_USE_NANOSLEEP
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mkline@cs.wisc.edu


Created attachment 26963
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26963
A short test program (13 lines) illustrating the problem

Inside the thread header for C++11, _GLIBCXX_USE_NANOSLEEP is not defined on my
system, causing std::this_thread::sleep_for to be undefined. However, defining
it manually using -D_GLIBCXX_USE_NANOSLEEP causes the attached test program to
compile successfully and behave as intended.

I am using Ubuntu 10.04 LTS. The attached test code was successfully compiled
using
g++ -std=c++11 test.cpp -pthread -D_GLIBCXX_USE_NANOSLEEP


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

end of thread, other threads:[~2012-11-23 22:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23  1:49 [Bug libstdc++/52680] New: std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP mkline at cs dot wisc.edu
2012-03-23 13:17 ` [Bug c++/52680] " redi at gcc dot gnu.org
2012-03-23 13:31 ` mkline at cs dot wisc.edu
2012-03-23 13:55 ` paolo.carlini at oracle dot com
2012-03-30 19:21 ` mkline at cs dot wisc.edu
2012-03-31 12:19 ` redi at gcc dot gnu.org
2012-03-31 15:17 ` mkline at cs dot wisc.edu
2012-03-31 16:19 ` redi at gcc dot gnu.org
2012-04-17  9:44 ` [Bug libstdc++/52680] " paolo.carlini at oracle dot com
2012-04-17 16:36 ` mkline at cs dot wisc.edu
2012-06-05 18:15 ` redi at gcc dot gnu.org
2012-11-23 22:11 ` redi at gcc dot gnu.org
2012-11-23 22:31 ` redi at gcc dot gnu.org

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