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

ragel: Add -std=gnu++98 to CXXFLAGS. #494

Merged
merged 1 commit into from
Oct 28, 2017
Merged

Conversation

tpikonen
Copy link
Contributor

On my (linux, IA32) system mason build of ragel-6.9 fails with -Wnarrowing, due to use of -std=c++11. This patch adds -std=gnu++98 to CXXFLAGS, which is enough to make the compiler not to turn this warning into an error.

There is probably a cleaner way to fix this though.

@springmeyer
Copy link
Contributor

The problem is that mason hardcodes std=c++11. So I recommend trying out this fix to remove it:

export CXXFLAGS="${CXXFLAGS//-std=c++11}"

Does that alone work or do you really also need -std=gnu++98. I presume -std=gnu++98 does not need to be added.

@tpikonen
Copy link
Contributor Author

No, just removing -std=c++11 does not work. This does:

export CXXFLAGS="${CXXFLAGS//-std=c++11} -std=c++03"

(or using -std=gnu++98 as in the original PR).

Prevents a compile error from -Wnarrowing.

Also redefine mason_cflags and mason_ldflags, since there is no
pkg-config file in ragel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants