This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: externs and thread local storage
- From: "Gary Funck" <gary at intrepid dot com>
- To: "Gcc Mailing List" <gcc at gcc dot gnu dot org>
- Date: Sun, 2 Jul 2006 14:55:15 -0700
- Subject: RE: externs and thread local storage
Pinski wrote:
> 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.
Yup. Certainly a great way to re-use space across separately compiled
"C" source files (ala Fortran's blank common). <g>
I can see where the compiler is within its rights to issue
a warning above, or even a pedantic error.