#ifndef PRL_TI_FI_H
#define PRL_TI_FI_H

/* Compilers may use another function within the assert macro to exit the 
 * program. QAC thus does not see an "exit" function and assumes the 
 * function returns, which it does not.
 * The below pragma tells QAC the compiler supplied function does not
 * return.
 */

#pragma PRQA_NO_RETURN _abort_msg

/* Unfortunately, the TI assert function has the test integrated so doesn't
 * always abort. Therefore we stub it here with one that has the desired
 * behavior for dataflow analysis
 */
#undef assert
void __abort(void);
#pragma PRQA_NO_RETURN __abort
#define assert(expr)  ((expr)?((void)0):__abort())

/* Depending on the code that the compiler maker uses within the assert macro,
 * QAC may issue warnings. It is also possible that when the NDEBUG macro is used
 * to suppress the assertion code, QAC may issue a "no side-effects" warning.
 * To eliminate these, we turn off all warnings for the assert macro.
 */
#pragma PRQA_MACRO_MESSAGES_OFF "assert"

#if __QAC_MAJOR__ < 96
/* C99 */
#define _Pragma _ignore_paren
#endif

#if __QAC_MAJOR__ < 95
#define __ALIGNOF__ __alignof__
#else
#define __ALIGNOF__ _Alignof
#define __alignof__ _Alignof
#endif

/* stdarg.h */
#define __va_argcsu(type) 0
#define __va_parmadr(n) (n)

/* Any other items that may be required in a "force-include" file should be placed below. */

#else
#error "Multiple include"
#endif  /* ifndef PRL_TI_FI_H */

