lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Philippe Verdy once stated:
> May be there's a way to configure macros to detect support of incline
> functionsso that they replace the macro expression by a function call. This
> would allow better type analyses on platforms with C99 compatibility and
> linting, including unsafe or unchecked typecasts and conversions, causing
> undefined behaviors.

#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
#  define macro(x) ...
#elif __STDC_VERSION__ >= 199901L
  static inline int macro(x) { ... }
#endif

  -spc