> What really would not make sense would be for an international treaty to restrict what a country can do with its own software in that country
That's why people are concerned about the TPP, it appears to do exactly that. Not just in case of source code audits, but in general TPP seems to limit a country's ability to pass new legislation pretty significantly, including in areas that are not related to global trade (e.g. IP).