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

Please, enable "narrowing conversion" GCC warnings. #6532

Closed
DorpsGek opened this issue Dec 21, 2016 · 2 comments
Closed

Please, enable "narrowing conversion" GCC warnings. #6532

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

Comments

@DorpsGek
Copy link
Member

adf88 opened the ticket and wrote:

Current OpenTTD build system always adds "-Wno-narrowing" flag for GCC >= 4.0.7 and there is no way to simply override it (see #6433). IMO these warnings are really useful and it would be good to have them. All that has to be done is to remove this line from config.lib:

cxxflags="$cxxflags -Wno-narrowing"

In current OpenTTD code, there are no implicit "narrowings", at least GCC 5.4.0 compiles the code without any warnings when -Wnarrowing flag is present.

Reported version: Version?
Operating system: All


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

adf88 wrote:

Note: it seems that in VS the warning is NOT disabled (C4838) but I can't easily check it now...


This comment was imported from FlySpray: https://bugs.openttd.org/task/6532#comment14307

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Implemented

in r27703


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

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Build system labels Apr 7, 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