#484: CCTK_CHECK_C_INLINE can define away the inline keyword ---------------------+------------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by eschnett):
GCC and many other compilers supported the inline keyword for a long time. Unfortunately, ANSI C now standardised this in an incompatible manner, generating essentially two incompatible dialects of C. In Cactus, we need to decide which of these dialects we want to support. Historically, we of course supported the inofficial one (since it was the only one that existed).
I tried the C99 dialect some time ago (maybe one year ago?), and things failed. I tested more thorns that just the standard ET thorns; in particular, I included many external libraries as well.
Many compilers have options to switch behaviour; in other cases, we can use autoconf. For example, gcc 4.6 (I believe) supports both dialects, depending on the -std setting. IBM's xlc treats the keywords __inline and __inline__ differently... PGI may have something similar.
Yes, this line 180 is wrong -- it should test HAVE_CCTK_C_INLINE instead.