public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/3036: pair constructor not updated per DR 265
@ 2001-06-03 23:26 Kenny Simpson
  0 siblings, 0 replies; 3+ messages in thread
From: Kenny Simpson @ 2001-06-03 23:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3036; it has been noted by GNATS.

From: Kenny Simpson <theonetruekenny@yahoo.com>
To: Phil Edwards <pedwards@disaster.jaj.com>, kenny.simpson@gs.com
Cc: gcc-gnats@gcc.gnu.org, theonetruekenny@yahoo.com
Subject: Re: libstdc++/3036: pair constructor not updated per DR 265
Date: Sun, 3 Jun 2001 23:16:30 -0700 (PDT)

 --- Phil Edwards <pedwards@disaster.jaj.com> wrote:
 ...  Does gcc DTRT as far as 178 goes? ...
 
 Well, with the help of the uber-spiffy online
 compiler, I ran the following test:
 (g++ -O3 -S: observe the output)
 >>>
 template <typename T>
 struct Foo
 {
 Foo() : m() {}
 T m;
 };
 
 // dummy function to prevent things from being
 // optimized-out
 template <typename T>
 void bar(T const&);
 
 int main()
 {
 // test each fundamental type
 bar(Foo<bool>().m);
 bar(Foo<char>().m);
 bar(Foo<unsigned char>().m);
 bar(Foo<signed char>().m);
 bar(Foo<short>().m);
 bar(Foo<unsigned short>().m);
 bar(Foo<int>().m);
 bar(Foo<unsigned int>().m);
 bar(Foo<long>().m);
 bar(Foo<unsigned long>().m);
 bar(Foo<long long>().m);
 bar(Foo<unsigned long long>().m);
 bar(Foo<float>().m);
 bar(Foo<double>().m);
 bar(Foo<long double>().m);
 
 // test pointer types
 bar(Foo<int*>().m);
 bar(Foo<int**>().m);
 
 return 0;
 }
 <<<
 
 In each of the tests, gcc DTRT as far as zero 
 initializing the data member 'm', though the stack
 space was poorly allocated (each temp got it's own
 slot even though the lifetimes are disjoint).
 
 -Kenny
 
 __________________________________________________
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail - only $35 
 a year!  http://personal.mail.yahoo.com/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libstdc++/3036: pair constructor not updated per DR 265
@ 2001-06-03 18:26 Phil Edwards
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Edwards @ 2001-06-03 18:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR libstdc++/3036; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: kenny.simpson@gs.com
Cc: gcc-gnats@gcc.gnu.org, theonetruekenny@yahoo.com
Subject: Re: libstdc++/3036: pair constructor not updated per DR 265
Date: Sun, 3 Jun 2001 20:04:02 -0400

 On Sat, Jun 02, 2001 at 01:04:16AM -0000, kenny.simpson@gs.com wrote:
 > The constructor for pair has been changed, see:
 > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#265
 
 The notes on that DR mention that "this is the right thing to do now that
 core issue 178 has cleared it up."  Does gcc DTRT as far as 178 goes?
 It seems to be introducing the "value-initialized" thing, and I'd hate to
 introduce a fix in the library which depends on a change in the compiler
 which hasn't happened yet.
 
 Maybe gcc has been behaving correctly already, and they're just fixing up
 the wording in the standard text.  In which case my question is utterly moot.
 
 -- 
 pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
 devphil at several other less interesting addresses in various dot domains
 The gods do not protect fools.  Fools are protected by more capable fools.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* libstdc++/3036: pair constructor not updated per DR 265
@ 2001-06-01 18:06 kenny.simpson
  0 siblings, 0 replies; 3+ messages in thread
From: kenny.simpson @ 2001-06-01 18:06 UTC (permalink / raw)
  To: gcc-gnats; +Cc: theonetruekenny

>Number:         3036
>Category:       libstdc++
>Synopsis:       pair constructor not updated per DR 265
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 01 18:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     kenny.simpson@gs.com
>Release:        20010528 snapshot
>Organization:
>Environment:
source
>Description:
The constructor for pair has been changed, see:
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-defects.html#265

in include/bits/stl_pair.h the old definition of
    pair() : first(_T1()), second(_T2()) {}
exists, but this should now be
    pair() : first(), second() {}
>How-To-Repeat:

>Fix:
remove _T1() and _T2() from pair's default constructor.
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-03 23:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-03 23:26 libstdc++/3036: pair constructor not updated per DR 265 Kenny Simpson
  -- strict thread matches above, loose matches on Subject: below --
2001-06-03 18:26 Phil Edwards
2001-06-01 18:06 kenny.simpson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).