I am compiling a quite a big project using VxWorks6.8 C++ compiler. I am getting following warning
warning: extra tokens at end of #endif directive
#ifndef _OM_NO_IOSTREAM
#ifdef WIN32
#ifndef USE_IOSTREAM
#define USE_IOSTREAM
#endif USE_IOSTREAM
#endif WIN32
I am getting a quite a lot of these warnings.
- Why i am getting these warnings and from C++ standard point of view?
- What is the good reason why compiler is warning for this?
- What is the best way to fix this?
Thanks
should be:
#endif // USE_IOSTREAM
#endif // WIN32
endif
doesn't take any arguments. Such comments are placed only for readability
EDIT:
and you miss closing #endif // _OM_NO_IOSTREAM
at the end
Because you can't have anything after #endif
Also, you're missing an endif.
#ifndef _OM_NO_IOSTREAM
#ifdef WIN32
#ifndef USE_IOSTREAM
#define USE_IOSTREAM
#endif
#endif
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With