<html>#2363: make cctk_Loop.h work in Fortran even if an ANSI C preprocessor is used
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Comment (by Roland Haas):</p>
<p>Admittedly I have not looked into the actual practicality of this, given that everything does indeed use <code>--traditional</code>. This ticket is solely based on the observation that Cactus' <code>cctk_Types.h</code> 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 “//”).</p>
<p>So it is a “make everything behave the same way” type ticket.</p>
<p><a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-271" rel="nofollow">https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-271</a></p>
<div class="codehilite language-c"><pre><span></span><span class="cp">#if CCTK_ANSI_FPP</span>
<span class="cp">#define CCTK_DECLARE(typ,nam,dim)                       \</span>
<span class="cp">  typ nam dim &amp;&amp;                                        \</span>
<span class="cp">  integer, parameter :: cctki_use_##nam = kind(nam)</span>
<span class="cp">#else</span>
<span class="cp">#define CCTK_DECLARE(typ,nam,dim)                       \</span>
<span class="cp">  typ nam dim &amp;&amp;                                        \</span>
<span class="cp">  integer, parameter :: cctki_use_</span><span class="cm">/**/</span><span class="cp">nam = kind(nam)</span>
<span class="cp">#endif</span>
</pre></div>


<p>where <code>CCTK_ANSI_FPP</code> is set via magic <a data-is-external-link="true" href="https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-241" rel="nofollow">https://bitbucket.org/cactuscode/cactus/src/25ace96251c4d720317afcbe00fa3f9d0646c272/src/include/cctk_Types.h#lines-241</a></p>
<div class="codehilite language-c"><pre><span></span><span class="cm">/* The empty</span>
<span class="cm">   comment in the definition of CCTK_ANSI_FPP will either turn into</span>
<span clas
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2363/make-cctk_looph-work-in-fortran-even-if-an'>https://bitbucket.org/einsteintoolkit/tickets/issues/2363/make-cctk_looph-work-in-fortran-even-if-an</a></p>
</html>