Peter Jensen <skrued...@yahoo.dk> writes: > I am creating a plugin which parses the generic tree and inserts a function > call in a if/else clause. > The function writes which lineno gets executed to stdout. > I wish to get the line number for the if statement and for the else > statement. (and not the body. eg ELSE_CLAUSE). > > My problem is that while I can get the line number for the if condition (eg. > DECL_SOURCE_LINE(if_cond)), > is it also possible to get the precise line number for the 'else' label?
You mean the location of the "else" keyword in the source code? Unfortunately that location is not currently recorded in GENERIC or GIMPLE. You can of course get the location of the first statement in the else block. Ian