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 warning on boolean operator precedence #73

Open
GoogleCodeExporter opened this issue Jul 19, 2015 · 0 comments
Open

GCC warning on boolean operator precedence #73

GoogleCodeExporter opened this issue Jul 19, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. try to compile from source version 0.2.1

What is the expected output? What do you see instead?
it does not compile...

What version of the product are you using? On what operating system?
with g++ (GCC) 4.3.0 on Linux

Please provide any additional information below.
this version of gcc issues a warning for constructs like
a<b || c<d && a==b
the default compilation flags include -Werror, so the compile fails.
The error is always:
"suggest parentheses around && within ||"
Changing to
a<b || (c<d && a==b)
or something similar solves the issue

here are the points where this happens (file:line_number)
tile_logic.hpp:87
battle.cpp:391
battle.cpp:400
camera_controller.cpp:15
camera_controller.cpp:19
camera_controller.cpp:23
camera_controller.cpp:27
gamemap.cpp:374
keyboard.cpp:28
keyboard.cpp:30
keyboard.cpp:32
keyboard.cpp:34
tile_logic.cpp:248
tile_logic.cpp:249
editorglwidget.cpp:491

I do not provide a patch since I cannot say what logic should be used.

Original issue reported on code.google.com by [email protected] on 24 Apr 2008 at 2:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant