This is the mail archive of the gcc@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]

Segfault generated by gcc-7


Hi,

I got a SEGFAULT in my program when compiling it with gcc-7 but it
is/was all good when using gcc-6.

The SEGFAULT happens due to the line below:
d_point = *p;

And a fix for it (with gcc-7) has been:
memcpy(&d_point, 
	p, 
	sizeof(d_point));

Does this make any sense to anybody?


Cheers,
Marco


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