This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/40192] [4.4/4.5 Regression] Unable to use std::vector with typedef'd array types
- From: "jeff at schwabcenter dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2009 17:09:20 -0000
- Subject: [Bug c++/40192] [4.4/4.5 Regression] Unable to use std::vector with typedef'd array types
- References: <bug-40192-17730@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jeff at schwabcenter dot com 2009-05-19 17:09 -------
I understand the desire for backward compatibility, but are the semantics
actually the same? Are the vector values arrays, or do they decay to pointers?
Section 23.1 says standard container elements have to be CopyConstructible and
assignable, but raw arrays are neither.
Is there at least some flag to re-enable the diagnostic? If you're saying this
is a necessary evil for reasons of backward compatibility, then I understand,
but in my opinion, this is a step backward that will confuse newcomers like
Brian and hurt cross-compatibility. Speaking strictly as a GCC user, I don't
see any reason to reduce the compiler's ability to deduce an obvious mistake
with ill-defined semantics.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40192