summaryrefslogtreecommitdiff
path: root/libgfortran/runtime/fpu.c
blob: 4a2c1f1d431ff17d0f6f47f91d958a5f3b3cf0ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* This is needed for fpu-glibc.h, before all other includes */
#ifdef HAVE_FENV_H
#define _GNU_SOURCE
#endif

#include "libgfortran.h"

/* We include the platform-dependent code.  */
#include "fpu-target.h"

/* Function called by the front-end to tell us
   when a FPE should be raised.  */
extern void set_fpe (int);
export_proto(set_fpe);

void
set_fpe (int exceptions)
{
  options.fpe = exceptions;
  set_fpu ();
}