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

"behavior of a program is undefined" vs "program has undefined behavior" #6214

Open
AlisdairM opened this issue Mar 28, 2023 · 3 comments
Open

Comments

@AlisdairM
Copy link
Contributor

Sometimes we has "A program has undefined behavior", and other times we say "the behavior of a program is undefined".

As far as I can tell, these two alternate wordings mean exactly the same thing, and it would be good for consistency to pick just one form.

I suggest changing all "program is undefined" forms to the "has undefined behavior" form for the meta-reason that it puts the words "undefined behavior" together, making it easier to turn that term into a macro like "implementation defined", with a long term view to create an annex or index of undefined behaviors built on such a macro.

@jensmaurer
Copy link
Member

We also sometimes say "if ...., the behavior is undefined." Sometimes, the English flows better with alternate expressions of undefined behavior.

@AlisdairM
Copy link
Contributor Author

As noted, I have a meta-reason for trying to refactor wording to put "undefined" and "behavior" together, is that worth pursuing at all?

Thinking a little more, I guess the macro could simply be for the word "undefined", but I did like the more specific combination of "undefined behavior".

@jensmaurer
Copy link
Member

I understand the motif, I'm just pointing out it might be slightly more involved getting there.

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

No branches or pull requests

2 participants