Skip to content
Snippets Groups Projects
Commit 71ff88b4 authored by Josh Borrow's avatar Josh Borrow
Browse files

Attempted to make exp10 compatible with clang compilers

parent 544ff121
Branches
Tags
1 merge request!763Uninitialised Variable in EAGLE Cooling
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "space.h" #include "space.h"
#include "units.h" #include "units.h"
/* Maximum number of iterations for newton /* Maximum number of iterations for newton
* and bisection integration schemes */ * and bisection integration schemes */
static const int newton_max_iterations = 15; static const int newton_max_iterations = 15;
...@@ -559,7 +560,9 @@ void cooling_cool_part(const struct phys_const *phys_const, ...@@ -559,7 +560,9 @@ void cooling_cool_part(const struct phys_const *phys_const,
Helium_reion_heat_cgs / (dt_cgs * ratefact_cgs); Helium_reion_heat_cgs / (dt_cgs * ratefact_cgs);
/* Let's compute the internal energy at the end of the step */ /* Let's compute the internal energy at the end of the step */
double u_final_cgs; /* Initialise to the initial energy to appease compiler; this will never not be
overwritten. */
double u_final_cgs = u_0_cgs;
/* First try an explicit integration (note we ignore the derivative) */ /* First try an explicit integration (note we ignore the derivative) */
const double LambdaNet_cgs = const double LambdaNet_cgs =
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/* Some standard headers. */ /* Some standard headers. */
#include <math.h> #include <math.h>
#ifndef __GNUC__ #if !defined(__GNUC__)
/* Local headers. */ /* Local headers. */
#include "inline.h" #include "inline.h"
...@@ -60,4 +60,11 @@ __attribute__((always_inline, const)) INLINE static float exp10f( ...@@ -60,4 +60,11 @@ __attribute__((always_inline, const)) INLINE static float exp10f(
#endif /* __GNUC__ */ #endif /* __GNUC__ */
#if defined(__clang__)
#define exp10 __exp10
#define exp10f __exp10f
#endif /* __clang__ */
#endif /* SWIFT_EXP10_H */ #endif /* SWIFT_EXP10_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment