This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]