brintos

brintos / llvm-project-archived public Read only

0
0
Text · 850 B · 9a47eb8 Raw
37 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// <locale>10 11// class locale;12 13// explicit locale( const char* std_name );14 15// REQUIRES: no-exceptions16 17// Make sure we abort() when we construct a locale with a null name and18// exceptions are disabled.19 20#include <csignal>21#include <cstdlib>22#include <locale>23 24#include "test_macros.h"25 26 27void exit_success(int) {28    std::_Exit(EXIT_SUCCESS);29}30 31int main(int, char**) {32    std::signal(SIGABRT, exit_success);33    std::locale loc(NULL);34    (void)loc;35    return EXIT_FAILURE;36}37