The PR is for a C++ form of the form const double val() const { ... } where the warning location is at the second const (by accident, in reality it's just past the function's declarator), while the first const is the one that we are warning about. This patch adds some logic to the C and C++ frontends to look for the qualifier, or a typedef name, and point the warning there. C needs a little more work because the ignored qualifier could also be an address space. Bootstrapped and tested on x86_64-linux (a while ago, will retest). Ok for trunk? Bernd