[Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Mon Sep 8 23:22:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12218
------- Additional Comments From bangerth at dealii dot org 2003-09-08 23:22 -------
For added confusion -- this code crashes:
-------------------------------
struct C { int i; };
typedef int C::*mPtr;
const mPtr m = &C::i;
int main() {}
-------------------------------
whereas it doesn't if either
a) the variable m is not declared constant, or
b) m is declared in the entirely equivalent way
const int C::*m = &C::i;
W.
More information about the Gcc-bugs
mailing list