Skip to content

Commit

Permalink
Fixed sizeof for boolean types
Browse files Browse the repository at this point in the history
  • Loading branch information
totalspectrum committed Feb 4, 2024
1 parent 96e342e commit 35b3c43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version 6.9.0
- Fixed some nucode compilation problems with the C test suite
- Fixed failure to allocate memory for local variables in some cases
- Fixed incorrect removal of some functions that were not completely inlined
- Fixed sizeof() for boolean types

Version 6.8.1
- Fixed using new keywords like `bytes` in parameters with default values
Expand Down
4 changes: 4 additions & 0 deletions expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,10 @@ ExprTypeRelative(SymbolTable *table, AST *expr, Module *P)
switch (expr->kind) {
case AST_TYPEOF:
return ExprTypeRelative(table, expr->left, P);
case AST_UNS_BOOLTYPE:
return ast_type_basic_boolean;
case AST_SIGNED_BOOLTYPE:
return ast_type_c_boolean;
case AST_INTEGER:
if ( IsCLang(lang) && expr->d.ival == 0) {
return ast_type_generic;
Expand Down

0 comments on commit 35b3c43

Please sign in to comment.