#2384: cctk.h includes cctk_Arguments.h
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:trivial
Component:Cactus

As of git hash 28a0e1d9 "This patch makes the CST stage create prototypes for all scheduled functions into a new file cctk_ScheduleFunctions.h, which is included into cctk.h." of cactus (about 9 years ago) cctk.h includes via ${thorn}_Schedule.h and the generated function prototypes for scheduled routines, the file cctk_Arguments.h. This means that a file like this:

#include <cctk.h>

void Null_Fun(CCTK_ARGUMENTS) {
  DECLARE_CCTK_ARGUMENTS;
  return;
}

compiles. This is somewhat surprising as the thorn writing docs http://einsteintoolkit.org/usersguide/UsersGuidech9.html#x13-85000C1.6.2 says that the file should be included.

For the most part code in the ET actually does so, though at least one file (MoL/src/MoLPreSync.cc) does not.

The prototypes are generated only for C routines where CCTK_ARGUMENTS always ends up being cGH *cctkGH though the route there is somewhat convoluted and involves a define (generated in GridFunStuff.pl):

push(@data, '#define CCTK_ARGUMENTS CCTK_CARGUM

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2384/cctkh-includes-cctk_argumentsh