- changed status to open
- removed comment
Turn CCTK_REAL8 etc. into typedefs
Currently, CCTK_REAL8 are #defines. This is inconvenient, since e.g. CCTK_REAL16 may be "long double", and the C++ syntax
CCTK_REAL16(x)
is then illegal, since this expands to "long double(x)". Turning CCTK_REAL8 and friends into proper typedefs remedies this.
The attached patch also corrects two small issues in cctk_Types.h: (1) The include guard around "cctk_Config.h" should not be there, and (2) some #endifs have wrong comments.
Keyword:
Comments (9)
-
reporter -
- changed status to open
- removed comment
The typedefs look fine. Did you also fix an issue with the last #endif in the file not really being include guard but the one belonging to HAVE_CCTK_C_ATTRIBUTE_UNUSED? That had me initially confused reviewing the patch.
-
- removed comment
Hmm. Fails to compile after I applied the patch.
/mnt/data/rhaas/postdoc/gr/Zelmani/src/include/cctk_Types.h:96:1: error: unknown type name 'CCTK_INT1_TYPE' typedef CCTK_INT1_TYPE CCTK_INT1; ^
I assume a -realclean will fix this but it should not be required I think since we already ask for a -reconfig.
Correction: apparently I have to run autoconf on it since configure needs to be updated.
-
reporter - removed comment
Yes, I also corrected a mixup with #endifs in cctk_Types.h.
Did you also regenerate "configure"? I didn't include this into the patch.
-
- removed comment
Yes, I regenerated configure. I would not compile before (lots of errors since the types were not defined). I also found out why you had all those commits change
#ifdef CCTK_REAL4
to#ifdef HAVE_CCTK_REAL4
:-). Since I had not put in the magic words explicitly in the previous review:Please apply.
-
reporter - removed comment
I thought it didn't compile? Does it work for you now?
-
- removed comment
I had to regenerate configure and updated my comment. However since editing a comment does not trigger an email I guess this was lost to the mailing list.
-
reporter - changed status to resolved
- removed comment
Applied.
-
- changed status to closed
- edited description
- Log in to comment