4 ms·
All I really want is C89 with stdint.h and safe(r) string handling routines (strncpy, snprinf, etc.). Hold the VLAs and the stdbool.h and the what-have-you.
by groovy2shoes 11y ago
All I really want is C89 with stdint.h and safe(r) string handling routines (strncpy, snprinf, etc.). Hold the VLAs and the stdbool.h and the what-have-you.
- GFK_of_xmaspast 11y ago(a) https://randomascii.wordpress.com/2013/04/03/stop-using-strncpy-already/ https://randomascii.wordpress.com/2013/04/03/stop-using-strn... (b) Can't you just use the parts of c99 that you want.
- groovy2shoes 11y ago(a) I'm aware, but thanks. (b) Use? yes, but only when I'm not using a library that relies on the parts I don't want. Implement? not really, since users expect their compilers to conform to the standards. Rely on for portable code? no, since not all compilers support C99 and many of those that do actually only support some subset. For now, I'm using C89 with my own safe string routines and a configure script to generate the bits of stdint.h that I need.
- TickleSteve 11y agowhich compilers aren't supporting C99 now? I keep hearing this argument but I haven't had that issue at all in recent years.
- groovy2shoes 11y agoMSVC and a lot of embedded compilers. Not to mention, I still have to support systems that are using rather old compilers.
- TickleSteve 11y agoI've got 25+ years experience in realtime/embedded work and I have to disagree with you there. all compilers I can think of have been C99 compliant for a number of years now. MSVC is compliant now also.
- groovy2shoes 11y agoHmm, that's all news to me. When did MSVC add full C99 support? I totally missed that. Also, which compilers are you using for your embedded work? Anyway, like I said, I'm often stuck supporting older compilers, too. So it might still be some time before I can "upgrade" to C99.