cgccc99fixed-point

Why aren't fixed-point types included in C99?


Thankfully, the complex type modifier was introduced into C99 standard. What I don't understand is why it was decided to omit support for fixed point arithmetic (specifically, support fractional types like 1.15 {signed} or 0.32 {unsigned}) where these types are so fundamental to DSP programming?

Does GCC support these through an extension?


Solution

  • It's been discussed/proposed (e.g., in N938, N953) but those papers have only proposed it as extensions, not additions to the main standard. Those seem to have led to its inclusion in N1169, which is a draft of TR 18037 ("Extensions to support embedded processors"), but that isn't considered complete (and the draft doesn't seem to have been updated in quite a while).

    My guess (though it's only a guess) is that work on it probably got dropped (at least temporarily) to concentrate on finishing C11. Whether work on it will resume now will probably depend on whether there are still people around who still care. Writing and submitting a paper based on those earlier ones that covers more detail, provides more supporting evidence, etc., might help to get it back in motion again (though I obviously can't guarantee anything).