public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type
@ 2003-03-27 18:16 Wolfgang Bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bangerth @ 2003-03-27 18:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Andreas Schwab <schwab@suse.de>
Cc: gcc-bugs@gcc.gnu.org, <harri.pasanen@trema.com>,
   <jean-paul_marinier@hp.com>, <tot@trema.com>, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy
 constructor of return type
Date: Thu, 27 Mar 2003 11:55:29 -0600 (CST)

 > |>     Apparently it wants to make a copy of the return arguments.
 > |>     Since at least in Standard C++ (not in Gnu C++) ?: returns
 > |>     an rvalue, I don't think this is necessary.
 > 
 > ?: returns an lvalue if both expressions have the same type.
 
 Sorry for the confusion, you are of course right. It shouldn't change the 
 outcome, though. I still think this behavior is in error.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 


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

* Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type
@ 2003-03-30 21:00 paolo
  0 siblings, 0 replies; 5+ messages in thread
From: paolo @ 2003-03-30 21:00 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, harri.pasanen, jason, jean-paul_marinier, tot

Synopsis: [3.3/3.4 regression] ?: operator requires public copy constructor of return type

State-Changed-From-To: analyzed->closed
State-Changed-By: paolo
State-Changed-When: Sun Mar 30 20:17:10 2003
State-Changed-Why:
    Fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10245


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

* Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy  constructor of return type
@ 2003-03-27 20:58 Janis Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Janis Johnson @ 2003-03-27 20:58 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Janis Johnson <janis187@us.ibm.com>
To: jean-paul_marinier@hp.com, gcc-gnats@gcc.gnu.org, tot@trema.com,
   gcc-bugs@gcc.gnu.org, harri.pasanen@trema.com, nobody@gcc.gnu.org,
   gcc-prs@gcc.gnu.org, jason@redhat.com
Cc:  
Subject: Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy 
 constructor of return type
Date: Thu, 27 Mar 2003 12:51:22 -0800

 The regression appeared with this patch, which was made to
 both mainline and 3.3-branch:
 
 2003-01-17  Jason Merrill  <jason@redhat.com>
 
         PR c++/9342
         * call.c (build_conditional_expr): Always do lvalue-rvalue
         conversion.
 
 The hunt used the submitter's test case on i686-pc-linux-gnu
 with mainline sources.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10245
 
 
 


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

* Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type
@ 2003-03-27 17:56 Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2003-03-27 17:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

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

From: Andreas Schwab <schwab@suse.de>
To: bangerth@dealii.org
Cc: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	harri.pasanen@trema.com, jean-paul_marinier@hp.com,
	nobody@gcc.gnu.org, tot@trema.com, gcc-gnats@gcc.gnu.org
Subject: Re: c++/10245: [3.3/3.4 regression] ?: operator requires public
 copy constructor of return type
Date: Thu, 27 Mar 2003 18:43:49 +0100

 bangerth@dealii.org writes:
 
 |>     Apparently it wants to make a copy of the return arguments.
 |>     Since at least in Standard C++ (not in Gnu C++) ?: returns
 |>     an rvalue, I don't think this is necessary.
 
 ?: returns an lvalue if both expressions have the same type.
 
 Andreas.
 
 -- 
 Andreas Schwab, SuSE Labs, schwab@suse.de
 SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
 Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
 "And now for something completely different."


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

* Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type
@ 2003-03-27 17:26 bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2003-03-27 17:26 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, harri.pasanen, jean-paul_marinier, nobody, tot

Old Synopsis: regression in 3.3, C++ ternary operator confuses type lookup
New Synopsis: [3.3/3.4 regression] ?: operator requires public copy constructor of return type

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Mar 27 17:22:47 2003
State-Changed-Why:
    Confirmed. This worked in 3.2, but doesn't anymore in 3.3 and
    3.4. Here's an extract:
    ----------------------------
    struct X {};
    
    struct Y {
        Y ();
        operator X () const;
      private:
        Y (const Y &);
    };
    
    void foo() {
      X x = (1 ? Y() : Y());
    }
    ------------------------
    
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In function `void foo()':
    x.cc:7: error: `Y::Y(const Y&)' is private
    x.cc:12: error: within this context
    x.cc:7: error: `Y::Y(const Y&)' is private
    x.cc:12: error: within this context
    
    Apparently it wants to make a copy of the return arguments.
    Since at least in Standard C++ (not in Gnu C++) ?: returns
    an rvalue, I don't think this is necessary.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10245


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

end of thread, other threads:[~2003-03-30 20:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-27 18:16 c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2003-03-30 21:00 paolo
2003-03-27 20:58 Janis Johnson
2003-03-27 17:56 Andreas Schwab
2003-03-27 17:26 bangerth

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