This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52167] self-assignment should at least produce use-of-uninitialized warning


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52167

Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #2 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> 2012-02-08 14:01:05 UTC ---
Clang++ 3.0 warns:

/tmp/webcompile/_14716_2.cc:8:20: warning: variable 'foo' is uninitialized when
used within its own initialization [-Wuninitialized]
  const string foo(foo);
               ~~~ ^~~
1 warning generated.

Clang improves a lot every 6 months, you should always check the latest version
(or SVN if possible).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]