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

Fix undefined behavior in p4parser.ypp #664

Merged

Conversation

sethfowler
Copy link
Contributor

This PR fixes a (harmless) instance of undefined behavior in p4parser.ypp. See the comment in the patch for more details.

@sethfowler sethfowler self-assigned this May 25, 2017
@sethfowler sethfowler requested a review from antoninbas May 25, 2017 02:22
Copy link
Member

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this. I can confirm that it fixes the issue.

@sethfowler sethfowler merged commit 1119165 into p4lang:master May 25, 2017
@sethfowler sethfowler deleted the seth/fix-undefined-behavior-in-p4parser branch May 25, 2017 02:54
Copy link
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very sad, when you have to expend so much energy to assign a Boolean value. I still like Java better than c++.

@sethfowler
Copy link
Contributor Author

I like most languages better than C++. =)

In fairness, in this particular case the root cause is a bug in Bison's variant implementation. They should've just used boost's version instead of reinventing the wheel.

@jnfoster
Copy link
Contributor

jnfoster commented May 25, 2017 via email

@jnfoster
Copy link
Contributor

jnfoster commented May 25, 2017 via email

@robertsoule
Copy link

+1 for OCaml

@sethfowler
Copy link
Contributor Author

Just imagine how much easier our lives would be if p4c was implemented in LabVIEW.

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.

5 participants