------- 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

Reply via email to