#2363: make cctk_Loop.h work in Fortran even if an ANSI C preprocessor is used
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:minor
Component:Cactus

Comment (by Roland Haas):

Admittedly I have not looked into the actual practicality of this, given that everything does indeed use --traditional. This ticket is solely based on the observation that Cactus' cctk_Types.h file contains explicit code to handle an ANSI C preprocessor which seems to hint that this may have worked once (possibly only for free form F90 code and code that does not use “//”).

So it is a “make everything behave the same way” type ticket.

https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-271

#if CCTK_ANSI_FPP
#define CCTK_DECLARE(typ,nam,dim)                       \
  typ nam dim &&                                        \
  integer, parameter :: cctki_use_##nam = kind(nam)
#else
#define CCTK_DECLARE(typ,nam,dim)                       \
  typ nam dim &&                                        \
  integer, parameter :: cctki_use_/**/nam = kind(nam)
#endif

where CCTK_ANSI_FPP is set via magic https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-241

/* The empty
   comment in the definition of CCTK_ANSI_FPP will either turn into
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2363/make-cctk_looph-work-in-fortran-even-if-an