Bug #33268 | Gcov offsets one line in sql_yacc.yy rules | ||
---|---|---|---|
Submitted: | 16 Dec 2007 13:20 | Modified: | 31 Jan 2014 13:04 |
Reporter: | Ingo Strüwing | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 5.1.23 | OS: | Linux (Debian x86_64) |
Assigned to: | CPU Architecture: | Any |
[16 Dec 2007 13:20]
Ingo Strüwing
[31 Jul 2008 16:53]
Ingo Strüwing
The cause of the problem seems to be that bison (yacc) adds a line with "break;" to most executable blocks in sql_yacc.yy when it creates sql_yacc.cc. For example these lines in sql_yqcc.yy 10569: | HASH_SYM {} 10570: | HIT_LIMIT_SYM {} 10571: | HOSTS_SYM {} become in sql_yacc.cc: case 1907: #line 10569 "sql_yacc.yy" {} break; case 1908: #line 10570 "sql_yacc.yy" {} break; case 1909: #line 10571 "sql_yacc.yy" {} break; This means that the break statements are accounted to the next line number in sql_yacc.yy by gcov. It would be great if bison had an option to put the break statements on the same lines as the last line of each block. Or if we had a tool that edits sql_yacc.cc after the bison run, at least when building for coverage testing.