Do you have a source for this?
here's the executive order mentioned at the beginning of the linked PDF: https://obamawhitehouse.archives.gov/the-press-office/2014/0...
here's NPR on the topic: http://www.npr.org/2014/04/13/301989789/pay-secrecy-policies...
here's the atlantic on the topic: https://www.theatlantic.com/business/archive/2014/07/when-th...
From the Atlantic article: Gag rules are a "widespread, illegal problem that the law has failed to address for decades. Gag rules violate a fundamental labor right and allow for discriminatory pay schemes."
---
In the UK, apparently the situation is similar. From http://www.acas.org.uk/index.aspx?articleid=1811 , "The Equality Act 2010 makes it unlawful to prevent employees from having discussions to establish if there are differences in pay. However, an employer can require their employees to keep pay rates confidential from people outside of the workplace."
here is the paragraph of UK law referred to: https://www.legislation.gov.uk/ukpga/2010/15/section/77
It's frowned upon by (most, not all) employers, but they are legally prohibited from banning sharing of employee salaries (as long as you are sharing your own information, not others). The culture of not sharing salary between employees is more an artifact of American culture to limit discussion of politics, religion, and money to those you are closest to (which has been changing to varying degrees).