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

Use _Bool for booleans #202

Open
zilinc opened this issue Dec 1, 2017 · 0 comments
Open

Use _Bool for booleans #202

zilinc opened this issue Dec 1, 2017 · 0 comments

Comments

@zilinc
Copy link

zilinc commented Dec 1, 2017

Issue by lim060
Fri Sep 4 16:49:07 2015
Originally opened as https://github.csiro.au/ts-filesystems/Cogent/issues/97


The _Bool type has better compatibility with C booleans, because truthy values are automatically converted to 1 on assignment. This eliminates bugs like 323f4e4de.

The fix should be as simple as

typedef struct bool_t {
  _Bool boolean;
} bool_t;

c-parser treats _Bools as 8 word so verification should be mostly unaffected.

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