-
Notifications
You must be signed in to change notification settings - Fork 86
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
MSVC error 2229 #202
Comments
OK, but do you have an example lexer input file for us to replicate the problem so we can fix it? That would help. Without a test case we can only guess, since the tool and the output generation has lots of options. The generated header file declares the So again, please provide more details when this happens. |
That output is generated with option This never happens with normal lexer specifications that have at least one rule. Lexer specifications that do not have rules are not useful. Perhaps the reflex tool should just bail out with an error and not generate any code when no rules are specified. On the other hand, just removing these empty array declarations from the output works fine too. Perhaps something to do for the next release update, it's just easy to work around by adding a guard like so in src/reflex.cpp:2399:
|
- add pkg-config files reflex.pc and relfexmin.pc with updated configure and makefiles - minor update of option -p to permit empty lexer specifications #202
Generation method:
The build option uses --flex --header-file -i
The problem is that the resulting header file contains a large number of structure or bit fields whose members contain an array of size zero, but that is not the last member. This causes errors when compiling with msvc.
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2229?view=msvc-170
The text was updated successfully, but these errors were encountered: