[Bug c/53091] static initializer accepted by clang but not by gcc

2012-04-24 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 --- Comment #14 from bugs at m8y dot org 2012-04-24 15:00:42 UTC --- Heh. Thanks, but our current target is clang->llvm, I was just surprised that gcc did not accept it. The codebase being converted by unc0rr's haskell-based tokeniser i

[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 --- Comment #11 from bugs at m8y dot org 2012-04-23 21:01:03 UTC --- Yeah, I get the difference now. Ok. Fair. So, I guess clang is just taking the values of the const ints at the time the assignment occurs (0x01 and 0x02) and assigning 0x03. If

[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 --- Comment #8 from bugs at m8y dot org 2012-04-23 19:57:37 UTC --- In response to comment #7, I was referring to this portion of the linked document. -- Not that you are likely to care, but the Standard states that enumeration types are of a

[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
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

[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 --- Comment #3 from bugs at m8y dot org 2012-04-23 18:59:59 UTC --- Hey. I attached it as well. I didn't just provide a URL. Anyway, I take it this is a "Won't Fix" ? I guess it isn't the end of the world since we are

[Bug c/53091] Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 --- Comment #1 from bugs at m8y dot org 2012-04-23 18:25:42 UTC --- Created attachment 27224 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27224 Demo of problem

[Bug c/53091] New: Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang

2012-04-23 Thread bugs at m8y dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53091 Bug #: 53091 Summary: Const assignment fails in GCC 4.2, 4.4, 4.6, 4.7 - works fine in clang Classification: Unclassified Product: gcc Version: 4.7.0 URL: http://m