On Sun, 07 Feb 2010 15:19:58 MST "Lyndon Nerenberg (VE6BBM/VE7TFX)" <lyn...@orthanc.ca> wrote: > > i suspect the rationale was that, finally, C provided a way > > outside the preprocessor to give symbolic names to constants. > > why restrict that to int? > > Because enum's have been int's since their inception? > > I'm sympathetic to the underlying need, but making a fundamental > type of the language suddenly become variable does not seem to > be the right way of going about this. > > E.g., what is the type of: > > enum { > a = 1, > b = 2.44000000000000000000618549L, > c = 2.44F, > d = "this is weird", > e = 1LL<<62, > } foo;
The cleanest solution would be to treat C's _static const_ "variables" as as compile time constants. I wish the standard dictated this.