Re: So what Standard are we working off?



Richard Heathfield wrote:
Harald van D?k said:

Richard Heathfield wrote:
Mark F. Haigh said:

Richard Heathfield wrote:

<snip>

I think the part of the C community that cares about portability wants
a widely-implemented standard, which it already has. Until C99 becomes
as widespread as C90, why would anyone use it if they need
portability?

Come on, quit being so negative. Having everybody agree on "restrict"
now, for example, is better than a bunch of subtly incompatible type
aliasing optimization extensions later.

Not if it stops my program from compiling.

It shouldn't if you define restrict as an empty macro in C90 mode, or
otherwise hide it.

I have found that the best way to hide restrict is not to define it at all,
not to use it, not to even think about using it, except of course as a
perfectly normal identifier. As far as I'm concerned, it's in user
namespace, and the C standardeers have no business polluting that space.

Sorry, I think I misunderstood your previous message. I thought you
meant a C99 program using "restrict" would not compile with a C90
compiler, but you probably meant a C90 program using an identifier
"restrict" would not compile with a C99 compiler, right? If so, I think
it's annoying if you actually have such code, but pretty much
unavoidable unless you want to use something like __restrict instead. I
haven't seen restrict myself as an identifier, but I have seen inline()
functions which cause the same problems.

.



Relevant Pages