In addition to POSIX/ANSI/IEEE and LSB, NuttX is written to C89 (mostly).

However, as Greg points out, this particular (non-ANSI, non-C89)
interface comes to us from LSB. And if there is this interface, then
there are probably others.
The issue here is not C89.  C89 permits passing structures and unions.  The issue here is the limitation of one toolchain that does not comply with C89 in this case.
For reasons like this, I think CONFIG_CAN_PASS_STRUCTS is a good compromise.
I think it is a reasonable compromise as well, but if SDCC has corrected their C89-compliance problem, then there would be no need to compromise.  We will need to look into that.. perhaps ask on the SDCC mail list: https://sourceforge.net/p/sdcc/mailman/sdcc-user/
That way, we can be:
o Loosely C89 except where being C89 interferes with other standards
o Strictly C89 at the cost of losing some compliance with other standards

Again, this is not a C89 issue.

The basic rules of the files are that within architecture- and board-specific code, people can follow most whatever C standard they prefer, but outside of the architecture- and board-specific code, we need to follow the lowest common denominator which is C89.

(And, yes, we have to be very careful not to turn into a GCC-only,
ARM-only, Linux-only system.)

That would have some short term gains, but would be suicide in the long run.

Greg


Reply via email to