adapt to API change
Add line number to error message of -nogc switch.

This was suggested by bearophile in the news group.
It also changes all passed Loc objects to be const ref.