Skip to content

Commit 52fe84b

Browse files
committed
Force enums to have integer type
This is consistent with java and native treatment of enums.
1 parent de5d5d5 commit 52fe84b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/Modules/fortran.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2762,6 +2762,8 @@ int FORTRAN::enumDeclaration(Node *n) {
27622762
} else {
27632763
Setattr(c, "fortran:name", child_fsymname);
27642764
}
2765+
// Force enum to have integer type
2766+
Setattr(c, "type", "int");
27652767
// Add enum name to the symtab
27662768
Setattr(fsymtab, lower_fsymname, n);
27672769
Delete(lower_fsymname);

0 commit comments

Comments
 (0)