to_line blowing up

Neil Booth neil@daikokuya.co.uk
Tue Aug 26 07:00:00 GMT 2003


Mike Stump wrote:-

> Ok, so call me confused, how can:
> 
> void
> fe_file_change (const struct line_map *new_map)
> {
>   unsigned int to_line = SOURCE_LINE (new_map, new_map->to_line);
> 
> possibly be right?  to_line is a normal line number, and 
> new_map->to_line is a normal line number?  Therefore, what can 
> SOURCE_LINE do to this, but confuse the line number?
> 
> Related to this, should from_line ever be > to_line in the map?
> 
> If one compiles:
> 
> 	int i;
> 
> as a C++ file, and watches what the above code does, one should be able 
> to see it go bad.

It looks like to_line can be killed, and replaced with new_map->to_line
in the 2 places it's used.

Neil.



More information about the Gcc mailing list