0

I'm compiling for an embedded target and my compiler understands some non-standard macros. I want to define some "stub" macros for the benefit of eclipse (so that it doesn't pester me with spurious warnings).

I want something like:

#ifdef ECLIPSE_ENVIRONMENT
void __WFI_STUB(void) {} 
#define __WFI __WFI_STUB
#endif

So that in my code (which compiles fine),

__WFI();

Eclipse won't freak out about an unresolved function.

aaaidan
  • 7,093
  • 8
  • 66
  • 102

1 Answers1

2

Ah.

#ifdef __CDT_PARSER__
// do stuff
#endif
aaaidan
  • 7,093
  • 8
  • 66
  • 102