/* Test fegetenv preserves exception mask (bug 16198).
- Copyright (C) 2014 Free Software Foundation, Inc.
+ Copyright (C) 2014-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <fenv.h>
#include <stdio.h>
static int
do_test (void)
{
+#if FE_ALL_EXCEPT
fenv_t env;
if (feenableexcept (FE_INVALID) != 0)
printf ("fegetexcept returned %d, expected %d\n", ret, FE_INVALID);
return 1;
}
+#else
+ puts ("No exceptions defined, cannot test");
+ return 0;
+#endif
}
#define TEST_FUNCTION do_test ()