#1377: Cacus could/should provide M_PI --------------------------+------------------------------------------------- Reporter: sbrandt | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: GRHydro M_PI --------------------------+-------------------------------------------------
Comment (by eschnett):
The case for restrict and inline is slightly different. There, we disable a feature that may not be provided by the compiler, and since this is a keyword, the user has no way of working around this.
M_PI, on the other hand, is provided on all systems. It is likely also available by default on all systems. However, some compiler options make it unavailable. (There may also be compilers that require an option to enable M_PI, but I don't know of any of those.) In particular, GCC, Clang, Intel all provide M_PI by default.
The task here is thus: - provide sane option lists in Simfactory that don't disable M_PI - warn people if they accidentally disable M_PI with their compiler options
By the way, the current POSIX version does require M_PI: http://pubs.opengroup.org/onlinepubs/9699919799/. (This is POSIX 2008; same for POSIX 2004.)
I think that the presence of M_PI is not the actual problem, it is just the first problem that is encountered when compiler options are wrong in this way. Defining M_PI will allow the build process to continue a bit further, but may err out later with more POSIX requirements (M_2PI? M_SQRT2?).
If we want to provide a Cactus-wide solution, then it would need to be CCTK_PI.