This is the mail archive of the gcc-patches@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]

Re: Problems with PR 21210


Mark Mitchell <mark@codesourcery.com> writes:

| Nathan (Jasper) Myers wrote:
| 
| > Let's not be hasty.  We can minimize (maybe eliminate) broken code
| > when the C++ committee does speak just by turning off lots of
| > implicit conversions.
| 
| Already done!  Right now, we permit no implicit conversions to
| __complex__; hence the PR.

yes. However the suggestion is that we can do better by using 
*value-initialization* instead of zero-initialization.  The former
gives far more useful semantics.  The argument that arrays do not have a
default constructor do not look compeling considering the fact 

   struct S {
      double data[2];
      S() : data() { }
   }; 

has well defined semantics and S() triggers value-initialization of data.
There is nothing unsound there.  It is both technically and
practically sound.

-- Gaby


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