Well, it's not a lie that it's in my contract and that I signed it.
It is true that this clause is there in your contract, sure. But the clause itself is a lie - it’s void, because it contradicts the law, yet it is there, to make an impression that it’s not void.
There is no specific protection for it, but at the same time it also cannot be forbidden to be discussed. Employment protection in the UK is string enough that you cannot just fire someone for discussing it.
UK: you may discuss your pay to see if there's any discrimination (gender etc). (Maybe in other circumstances too, I'm not sure)
Not the OP. I believe that's the case in the US, but here in Canada, there generally aren't any laws against it. There was a bill in Ontario in 2018 that banned reprisals against workers who discussed their pay, but it died when the governing Liberal party lost the election and the Conservative party did not follow through. As far as I know, the practice is not banned in Alberta either.
There is no "the law", you'd need to be specific about which market you're talking about.
In the US, it’s only on a voluntary individual basis. For example, an HR employee that knows all employees pay information can be prohibited from sharing that information but cannot be prohibited from discussing their own pay.
I don't know. I've never needed to talk to a lawyer about it thankfully. If it is something that's explicitly protected then plenty of companies are getting it wrong.