xiaoxiang781216 commented on pull request #2418:
URL: https://github.com/apache/incubator-nuttx/pull/2418#issuecomment-734755934


   > > > is that any reason C++ code does it but C code doesn't?
   > > > otherwise, if we care namespace pollution, i guess it's better to 
remove OK/ERROR unconditionally.
   > > 
   > > 
   > > OK/ERROR usage in NuttX is very large, removing OK/ERROR is a huge work.
   > 
   > i agree.
   > 
   > > > or, make them conditional on `_NUTTX_SOURCE` or whatever.
   > > > how do you think?
   > > 
   > > 
   > > Yes, it could work, but require we define or undefine _NUTTX_SOURCE in 
the different case.
   > 
   > i agree.
   > 
   > > Anyway, I change the macro to enum now, so we can avoid the namespace 
pollution in most case.
   > 
   > unlike C++, enum names are not scoped in C, afaik.
   > 
   > anyway, i'm not against this PR. i just wanted to know if there's really 
something specific to C++.
   
   Yes, your concern is right: the problem isn't specific to C++. That's why 
the new change remove `#ifdef __cpluscplus` too.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to