On Tue, 2005-05-24 at 20:54 -0400, DJ Delorie wrote: > > This doesn't do what I want at all. The goal is to make the *symbolic > > enumeration constants* inaccessible to most code. > ... > If it's OK to have the enums in a header, provided you can't *use* them... > > enum { > #ifdef TVQ_AUTHORITATIVE_ENUMS > TVQ_FOO1, > TVQ_FOO2, > TVQ_FOO3, > TVQ_NUM_ENTRIES, > #endif > TVQ_INT_SIZER = 32767; > } TheValQuux; > > This won't stop a suitably enthusiastic programmer from getting to > them anyway, but that's always the case.
Ooh, I like this one for enum machine_mode. The relevant header (machmode.def) is already machine-generated, so it would be a fairly small change. And doesn't in any way interfere with Gabriel's cleanups to use the enumeration type instead of 'int', which is good. Be a hell of a lot of breakage to sort through, though. Unless we've got a volunteer with a whole lot of time, I don't think this is happening for 4.1. Oh well. zw