summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/date.time/ctime.thread-unsafe.fail.cpp
blob: cd246c6315270e5fc63ddbb4bba358b73b5e00db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===----------------------------------------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

// REQUIRES: libcpp-has-no-thread-unsafe-c-functions

#include <ctime>

int main() {
    // ctime is not thread-safe.
    std::time_t t = 0;
    std::ctime(&t);
}
OpenPOWER on IntegriCloud