Aha. This was bug http://bugs.squid-cache.org/show_bug.cgi?id=2960.I've now added the 3.1 workaround to the wiki build instructions for Solaris where it should have been.
It consists of renaming the clashing Squid class definition through the entire Squid sources:
find . -type f -print | xargs perl -i -p -e 's/\b(IpAddress\b[^.])/Squid$1/g (mind the wrap on that) Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.11 Beta testers wanted for 3.2.0.5