-
Notifications
You must be signed in to change notification settings - Fork 291
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
Revert "Portability fixes" #395
Conversation
This reverts commit f346907.
Reviewed 27 of 27 files at r1. Comments from Reviewable |
# Set standard version for compiler. | ||
add_cflag("-std=gnu99") | ||
add_cxxflag("-std=c++98") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks incorrect to me. You only define the C standard if warnings are enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. By default, gcc uses gnu89, which is sufficient for us at the moment (soon it won't be). @Zer0-One will hopefully make the original PR again which reverts this revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why are cxxflags set in a C-only library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also compile the code as C++ to make sure it's C++ compatible. Reasons:
- Additional C++-only tooling becomes available (static analysers).
- A few checks performed by C++ compilers (enum compatibility, void pointer casts) are useful for us.
@endoffile78 Would be nice if the PR mention why the commit was reverted. If I remember correctly from the IRC discussions (which not everyone going over PRs follows closely), it's because that commit broke toxcore on OS X? |
@nurupo correct |
This reverts commit f346907.
Reverted because some of the changes in f346907 caused toxcore to not compile on OSX.
This change is