This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] get_lineno and get_filename problem
>>>>> "Jose" == Jose Renau <renau@cs.uiuc.edu> writes:
You're better off reading the GNU Coding Standards before doing more
works on GCC, but to help you get started:
Jose> ! if (TREE_CODE (expr) == COMPOUND_EXPR)
Jose> expr = TREE_OPERAND (expr, 0);
Jose> return TREE_LINENO (expr);
Jose> }
Jose> --- 242,253 ----
Jose> if (expr == NULL_TREE)
Jose> return -1;
Jose> ! if (TREE_CODE (expr) == COMPOUND_EXPR)
Jose> expr = TREE_OPERAND (expr, 0);
Jose> + if( !TREE_LOCUS(expr) )
Jose> + return -1;
Jose> +
Jose> return TREE_LINENO (expr);
Jose> }
The (TREE_CODE (expr) == COMPOUND_EXPR) contains no visible changes.
Please eliminate any whitespace that causes this unnecessary diff.
Your additions should look like this:
if (!TREE_LOCUS (expr))
return -1;
Cheers, Ben