This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM-CGT: Are #ifdes allowed in #pragma?

Part Number: ARM-CGT

We need to compile our code base for different targets and reley on the preprocessor for it. We are unsure how pragmas that affect the next code line work.
For example, does the compiler understand the followoing example using #ifdef around an SWI pragma, or does the name of the function be on the next actual line (not the next code line)?
 
Can we write this
#ifdef __TI_COMPILER_VERSION__
#pragma SWI_ALIAS(foo, 1);
 
#endif /* __TI_COMPILER_VERSION__ */
extern void foo(void);

or are we requried to write:

#pragma SWI_ALIAS(foo, 1);
extern void foo(void);