How to give compiler error if a function parameter is not declared with __thread?

Shaun Pinney shaun.pinney@hl.konicaminolta.us
Sat Mar 26 00:00:00 GMT 2011


Hello all,

I want to restrict a function parameter to variables declared with __thread.
Is there a way to generate compiler errors if a user uses an incompatible
storage class?  The idea is to improve the 'user-friendliness' of an OS
porting layer - specifically, the parts related to thread-local storage.

Thanks,
Shaun




More information about the Gcc-help mailing list