gcc10 compile fix

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
spotrh
Posts: 1
Joined: Fri Jan 31, 2020 1:18 pm

gcc10 compile fix

Post by spotrh »

I would have put this in bugzilla, but I couldn't quite figure out how to get an account there, so I'll put it here instead.

Fedora 32 will use GCC 10, which sets -fno-common by default. This broke the rocks'n'diamonds compile, because the following variables are defined in multiple places:

struct SetupInfo setup;
int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];

The attached patch comments them out of src/main.c and resolves the issue.
Attachments
rocksndiamonds-4.1.4.1-gcc10.patch
(987 Bytes) Downloaded 175 times
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: gcc10 compile fix

Post by Holger »

Fixed! (Not in the Git repo yet...)

Did you encounter any other bugs or warnings when using gcc10?

(I think I should set up a little VM with gcc10 and check for myself... :-) )

P.S.: Regarding Bugzilla, I currently only set up accounts on demand, as I fear lots of spam if I open it up publicly for registration (because it does not offer any effective SPAM counter measures, unfortunately).
Post Reply