eteran / c-vector

A dynamic array implementation in C similar to the one found in standard C++
MIT License
737 stars 109 forks source link

Avoid C4127 warning on older compilers #23

Closed marekmosna closed 2 years ago

marekmosna commented 2 years ago

It's MISRA C familiar

eteran commented 2 years ago

Hmm, not sure I love this one as I'm not a fan of making code more unclear just to hush a warning on a compiler that is relatively rare (as far as I know). I'll have to think on it. Either way, I appreciate your contribution.

andy5995 commented 2 years ago

I tend to agree with @eteran on this.

It's a good idea to suppress that warning though. One of the alternatives mentioned at https://stackoverflow.com/questions/1946445/c-c-how-to-use-the-do-while0-construct-without-compiler-warnings-like-c412 might be more preferable.

marekmosna commented 2 years ago

Take your time. It's just years of hardcore embedded development for international corporates. Old habits die last.