What's the difference between (*(x)).a and (x)->a

2009-01-20 Thread holderlin
Hi, Is there any difference between (*(x)).a and (x)->a, if x is an expression which generates a struct pointer. I found the assembly code of these two generated by gcc are the same. But is the implementation compiler dependent? Or do they just have the same meaning expressed in different syntax?

ofdstream.h and segmentation fault

2006-05-22 Thread holderlin
buf () from /usr/lib/libstdc++.so.5 #5 0x08049a5a in ~stdio_filebuf (this=0xb9fc) at /usr/include/c++/3.2/ext/stdio_filebuf.h:115 #6 0x08049778 in ~ofdstream (this=0xb970) at a.cpp:19 #7 0x0804969d in main () at a.cpp:25 But if I compile a.cpp with g++ 3.4.4, there is no segmentation fault. I failed to find and fix the bug. Is this a bug in libstdc++? --- Holderlin Zhang Department of Applied Math., Nankai University

Different Object Model in g++-2.95 and g++-3.3.5?

2005-12-02 Thread holderlin
changes its object model. --- Holderlin Zhang Department of Applied Math., Nankai University