------- Comment #5 from pinskia at gcc dot gnu dot org 2008-04-05 21:16 ------- (In reply to comment #4) > (works with the C frontend) > We don't share the decls of g_iValue properly, but doesn't this program > violate the ODR anyway?
No it does not as there is only one g_iValue variable. The reasoning behind using extern int g_iValue; is so it does not get into the global scope. The reason why the C front-end works is because we have a non TU scope which we add decls to and then look up global decls that way and get that decl instead of creating a new one. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |wrong-code Last reconfirmed|0000-00-00 00:00:00 |2008-04-05 21:16:01 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35835