[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang
bugs at m8y dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 23 19:35:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091
--- Comment #6 from bugs at m8y dot org 2012-04-23 19:35:18 UTC ---
Oh, cool.
Probably going to replace w/ an enum, which does seem to work.
But it does make 0 sense to me that const int is forbidden, but enum is
allowed...
http://publications.gbdirect.co.uk/c_book/chapter6/enums.html
Can rewrite both const int and enum, so I don't really see why enum is
permitted but const int isn't, they both offer
about the same amount of safety.
I mean, might as well just force #define only. (please don't!)
More information about the Gcc-bugs
mailing list