Closed hedayat closed 3 years ago
You should probably stick the gcc specific stuff in a #if defined (__GNUG__)
.
This sounds important, so hopefully it gets merged?
Edit: I had to merge this change in to prevent segaults in release builds.
I've not tested, but AFAIK other compilers should ignore both unknown (scoped) attributes, and unknown pragmas. So, most probably compiler conditionals are not needed.
Unfortunately, the repo seems inactive. BTW, FakeIt docs says that it doesn't support optimized builds; so this PR is actually an enhancement rather than bug fix. So, not THAT important.
I think this change may also have to be added to everything under /single_header/. I'm not really sure how this repo works, I'm guessing you're meant to run generate_fakeit_single_header.py, and that'll update those?
I think this change may also have to be added to everything under /single_header/. I'm not really sure how this repo works, I'm guessing you're meant to run generate_fakeit_single_header.py, and that'll update those?
I'm not sure too. Anyway, since it is merged, I'll let himself do whatever is needed.
Fix a GCC warning about incompatible member function pointer cast
Disable de-virtualization in union_cast, which effectively prevents crashes when optimizaton is enabled under GCC when mocking classes with inline virtual dtor.