master
 1/**
 2 * This file has no copyright assigned and is placed in the Public Domain.
 3 * This file is part of the mingw-w64 runtime package.
 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 5 */
 6
 7#include <fenv.h>
 8#include <internal.h>
 9
10/* 7.6.2.5
11   The fetestexcept function determines which of a specified subset of
12   the exception flags are currently set. The excepts argument
13   specifies the exception flags to be queried.
14   The fetestexcept function returns the value of the bitwise OR of the
15   exception macros corresponding to the currently set exceptions
16   included in excepts. */
17
18int fetestexcept(int flags)
19{
20    return __mingw_statusfp() & flags;
21}