This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39179] [4.4 Regression] Wrong code in c++ for const members initialized in external file
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2009 18:56:12 -0000
- Subject: [Bug target/39179] [4.4 Regression] Wrong code in c++ for const members initialized in external file
- References: <bug-39179-15155@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from ebotcazou at gcc dot gnu dot org 2009-02-17 18:56 -------
TREE_STATIC && DECL_EXTERNAL doesn't make sense for a VAR_DECL as per tree.h:
/* In a VAR_DECL, nonzero means allocate static storage.
#define TREE_STATIC(NODE) ((NODE)->base.static_flag)
* In a VAR_DECL or FUNCTION_DECL, nonzero means external reference:
do not allocate storage, and refer to a definition elsewhere.
#define DECL_EXTERNAL(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.decl_flag_2)
That's why the Ada FE has simply stopped to generate this combination.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39179