‘gimple_match_range_of_expr’ was not declared in this scope
Developer introduces a new function in GCC's pattern matching code but forgets to declare it, causing a build error.
Kael Andrew Franco encountered an ‘undeclared identifier’ error for ‘gimple_match_range_of_expr’ while working on PR126085. The error stems from a recent change to gcc/match.pd. Franco acknowledged the issue was caused by their own commit and promised to upload a fix after testing.
- proposer
Reports an 'undeclared identifier' error for 'gimple_match_range_of_expr' in gcc/match.pd, stemming from their own recent commit.
“‘gimple_match_range_of_expr’ was not declared in this scope. This is giving me headache, what is the problem since I can't figure it out?”
- reviewer
Notes the error and quotes the original problem description.
“Kael Andrew Franco via Gcc <gcc@gcc.gnu.org> writes: > While working on PR126085, i keep running into this problem: > > ‘gimple_match_range_of_expr’ was not declared in this scope.”
- proposer
Confirms their commit caused the problem and states they will upload a fix.
“That was caused by my commit r17-1683-g43356828d897ad. Will upload a fix after quick bootstrap/test.”
Technical Tradeoffs
- Missing function declaration leads to build failure, requiring a quick fix.
In Details
This discussion concerns a build failure in GCC's pattern matching infrastructure, specifically within gcc/match.pd. The error 'gimple_match_range_of_expr was not declared in this scope' indicates that a newly added function or macro in the pattern definition file is being used before its declaration, likely due to a typo or an incomplete addition.