This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24455] [gomp] Trouble with threadprivate and extern
- From: "dnovillo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2005 17:52:42 -0000
- Subject: [Bug c/24455] [gomp] Trouble with threadprivate and extern
- References: <bug-24455-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from dnovillo at gcc dot gnu dot org 2005-10-20 17:52 -------
The problem here is that when we are parsing the second declaration, we call
start_decl before having parsed the threadprivate clause. This causes us to
miss the attribute.
One solution I'm considering is to look-ahead in c_parser_declaration_or_fndef
and build a regular tls_model attribute instead of lazily setting
DECL_TLS_MODEL when we get to the threadprivate #pragma. That seems a more
natural way of setting threadprivate attributes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24455