This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/27789] [4.2 Regression] attribute handling fallout from DECL_INITIAL changes
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2006 19:37:58 -0000
- Subject: [Bug target/27789] [4.2 Regression] attribute handling fallout from DECL_INITIAL changes
- References: <bug-27789-4066@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mmitchel at gcc dot gnu dot org 2006-06-04 19:37 -------
Checking DECL_INITIAL is not a reliable way to determine whether or not a C++
variable is initialized. (It never really has been, although I certainly made
the problems more severe!) Because C++ variables may be dynamically
initialized, and because DECL_INITIAL is just the static part of that
initialization (if any), you really need to check DECL_INITIALIZED_P.
One possible fix would be to move that macro into common C/C++ code. (It could
even check whether C or C++ was being compiled, and check DECL_INITIAL for C
code.)
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27789