Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixed a typedef problem
- Loading branch information
Showing
1 changed file
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18f1ddaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example: 'typedef union { char __mbstate8[128]; } __mbstate_t;'
The only way I've been able to make it work so far is to distinguish between ident's that are types, and non-types, so whenever the grammar processes a typedef statement it turns on a bit, and records the name in a global hash for later. When processing the declaration specifiers for "__mbstate8", it incorrectly considered "__mbstate8" to be a type ident because the typedef bit was ON, but it should have considered "__mbstate8" to be a non-type.
So there's two overlapping issues, (1) how to distinguish between type and non-type _ident_s, and (2) how to get the ident being defined if there is not typedef bit to depend on