This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: externs and thread local storage



On Jul 2, 2006, at 1:58 PM, Gary Funck wrote:
The fact that one current generally available platform doesn't require
the __thread attribute on the extern should be enough to at least
question whether an *error* should be diagnosed.  Also, consider
that compiler can't check for consistency across separately linked
files and the linker already will give an error if references to
__thread local objects don't have thread lcoal relocations.

What about the following two sources:


char t;

---
extern int t;


What should happen? According to the C standard this is invalid code but the compiler does not need to diagnose the problem.

-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]