-
Notifications
You must be signed in to change notification settings - Fork 169
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
Line number in #line directive after enum YYCONDTYPE is 0-based #152
Comments
Please point at the wrong
Compile with
|
Instead of Please insert some C code between |
The bug you're talking about is probably fixed in HEAD (I have no way to confirm it since I don't have a faulty example). There is at least one related fix in |
/*!types:re2c*/
#warning this is line 3
void f()
{
/*!re2c
<*> * {}
*/
} When you will generate code and compile it, you will get:
But it should be:
|
Yep, fixed in HEAD. I'll add your example to test suite. :) |
Good to hear :) BTW, keep in mind that warning message will vary between compilers and their versions, so check generated code only. Also to avoid warnings during compilation change |
YYCONDTYPE is 0-based". (thanks to sirzooro for reporting)
The good thing about re2c test suite is that we only test re2c-generated output (it should byte-to-byte coincide with reference output). Unlike C/C++ compiler results, re2c output is stable: we need to verify its correctness only once and then monitor all the changes. |
OK, looks good. |
As in title. Other
#line
directives seems to be correct, except that one - its value should be increased by one.The text was updated successfully, but these errors were encountered: