Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC compile error on fontcache.cpp #2752

Closed
DorpsGek opened this issue Mar 21, 2009 · 10 comments
Closed

GCC compile error on fontcache.cpp #2752

DorpsGek opened this issue Mar 21, 2009 · 10 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Maeyanie opened the ticket and wrote:

When compiling a Windows build with GCC, compile fails on fontcache.cpp because some goto calls jump across variable declarations.

Attached is a simple patch to fix it, by moving the affected declarations to the start of the function.

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/2752
@DorpsGek
Copy link
Member Author

Rubidium wrote:

What version of GCC are we talking about here?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5818

@DorpsGek
Copy link
Member Author

Maeyanie wrote:

Well, I'm using a 4.4.0 snapshot, but not allowing goto/case jumps over variable declarations has been in for a while. I'm not sure how long exactly.
The problem doesn't show up on a GCC Linux build because the code which causes it is wrapped in an "# ifdef WIN32" block.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5820

@DorpsGek
Copy link
Member Author

Rubidium wrote:

It compiles fine with MinGW's default GCC; the win9x nightly is built with GCC on a daily basis.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5821

@DorpsGek
Copy link
Member Author

Maeyanie wrote:

What version is that?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5822

@DorpsGek
Copy link
Member Author

Rubidium wrote:

gcc version 3.4.5 (mingw-vista special r3)
(gcc-3.4.5-20060117-3)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5823

@DorpsGek
Copy link
Member Author

Maeyanie wrote:

Yikes, that's a bit old. Restricting jumps might be part of the big optimization set that came with 4.0.
I notice MinGW's page also offers an "alpha" version of GCC 4.3.0, and that will almost certainly cause this error.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5824

@DorpsGek
Copy link
Member Author

Maeyanie wrote:

Hmm, or maybe not... a test program failed to compile with gcc version 3.4.6 20060404 (Red Hat 3.4.6-9).
Is the nightly build set to compile --without-freetype? It looks like that would disable the code in question.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5825

@DorpsGek
Copy link
Member Author

Rubidium wrote:

No, freetype is enabled (check http://binaries.openttd.org/nightlies/trunk/r15774/logs/windows-win9x-compile.log )


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5826

@DorpsGek
Copy link
Member Author

Maeyanie wrote:

Well, I don't know why it works for them. I compiled a vanilla GCC 3.4.5 and it fails a test program too.
Unless GCC with a Linux build system works differently from a Windows build system... but it shouldn't.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752#comment5827

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r15818


This comment was imported from FlySpray: https://bugs.openttd.org/task/2752

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant