Thanks very much for checking. I can put adequate notes in the documentation to address this. Let's hope people read them :) Best regards, Shaun > -----Original Message----- > From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On > Behalf Of Ian Lance Taylor > Sent: Friday, March 25, 2011 6:33 PM > To: Shaun Pinney > Cc: gcc-help@xxxxxxxxxxx > Subject: Re: How to give compiler error if a function parameter is not > declared with __thread? > > "Shaun Pinney" <shaun.pinney@xxxxxxxxxxxxxxxxxxx> writes: > > > Thanks Ian. I thought this would be the case. I'm thinking, since > there is > > a runtime component to __thread, there may be a function to query if a > > variable is thread-local (e.g. __isthreadscope(), __getscope(), etc). > Do > > you know of any query method? It's not a major issue, but would help > a bit. > > So far, I haven't spotted one. Thanks again. > > Any such test would have to be a compiler intrinsic, of course--once you > call a function the information has been lost. As far as I know there > is no such intrinsic. > > Ian