Palm-Studios / sh3redux

SILENT HILL 3 Engine Remake in OpenGL and C++
GNU General Public License v3.0
162 stars 16 forks source link

Create bugs folder to outline found compiler bugs #127

Open Quaker762 opened 6 years ago

Quaker762 commented 6 years ago

This is more for my own sanity and the sanity of others. I've hit 3-4 bugs in GCC (though I've only outlined 2) that people may encounter.

@z33ky You can see what I mean here: https://github.com/Quaker762/sh3redux/tree/bugs/bugs

z33ky commented 6 years ago

Regarding __attribute__((packed)), have you tried -mno-ms-bitfields? I think the template-namespace bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480, correct? Please link to the upstream issue.

Quaker762 commented 6 years ago

Regarding attribute((packed)), have you tried -mno-ms-bitfields?

Ahh, I forgot about that switch. That seems to fix it on Windows. There are some reports however that it's still a bug in GCC, so it might vary per flavour of Linux?? This is kind of an odd one (see here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54589; I've added this link to the top of the .cpp file)

I think the template-namespace bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480, correct? Please link to the upstream issue.

Yep, added it :)

z33ky commented 6 years ago

There are some reports however that it's still a bug in GCC, so it might vary per flavour of Linux?? This is kind of an odd one (see here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54589; ...)

Did you link the right bug? That one seems to just be a missed optimization opportunity which only activates if the struct has a certain layout - and there's no mention of #pragma pack.

Quaker762 commented 6 years ago

Whoops, must've linked the wrong one. I'll get on that ASAP.