public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9537: [3.4 regression] [New parser] problem handling const return types
@ 2003-05-05 21:11 jason
  0 siblings, 0 replies; 5+ messages in thread
From: jason @ 2003-05-05 21:11 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jason, mueller, nobody

Synopsis: [3.4 regression] [New parser] problem handling const return types

Responsible-Changed-From-To: unassigned->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Mon May  5 21:11:50 2003
Responsible-Changed-Why:
    mine
State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Mon May  5 21:11:50 2003
State-Changed-Why:
    fixed

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


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

* Re: c++/9537: [3.4 regression] [New parser] problem handling const return types
@ 2003-02-03 16:26 Wolfgang Bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bangerth @ 2003-02-03 16:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Dirk Mueller <mueller@kde.org>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/9537: [3.4 regression] [New parser] problem handling const
 return types
Date: Mon, 3 Feb 2003 10:20:09 -0600 (CST)

 > It seems PR 9440 describes a similiar problem. I've noticed this only after 
 > submitting my report. sorry. 
 
 Looks similar. I'm not quite sure, though, so I leave this one open and 
 post a note against the other one.
 
 Thanks
  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++/9537: [3.4 regression] [New parser] problem handling const return types
@ 2003-02-03  1:36 Dirk Mueller
  0 siblings, 0 replies; 5+ messages in thread
From: Dirk Mueller @ 2003-02-03  1:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Dirk Mueller <mueller@kde.org>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/9537: [3.4 regression] [New parser] problem handling const return types
Date: Mon, 3 Feb 2003 02:33:59 +0100

 bangerth@dealii.org schrieb am Sonntag, den 02. Februar 2003:
 
 
 >     Confirmed. I would say the code is legal, and even if not
 >     then it is certainly true that the error message absolutely
 >     does not make sense at all.
 
 It seems PR 9440 describes a similiar problem. I've noticed this only after 
 submitting my report. sorry. 
 
 
 -- 
 Dirk (received 805 mails today)


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

* Re: c++/9537: [3.4 regression] [New parser] problem handling const return types
@ 2003-02-02 22:32 bangerth
  0 siblings, 0 replies; 5+ messages in thread
From: bangerth @ 2003-02-02 22:32 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mueller, nobody

Synopsis: [3.4 regression] [New parser] problem handling const return types

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Sun Feb  2 22:32:13 2003
State-Changed-Why:
    Confirmed. I would say the code is legal, and even if not
    then it is certainly true that the error message absolutely
    does not make sense at all.
    
    W.

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


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

* c++/9537: [3.4 regression] [New parser] problem handling const return types
@ 2003-02-01 21:06 mueller
  0 siblings, 0 replies; 5+ messages in thread
From: mueller @ 2003-02-01 21:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         9537
>Category:       c++
>Synopsis:       [3.4 regression] [New parser] problem handling const return types
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 01 21:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Mueller
>Release:        3.4 20030201 (experimental)
>Organization:
>Environment:
System: Linux matrix 2.4.19-4GB #6 Thu Jan 30 02:58:14 CET 2003 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/opt/gcc --enable-c99 --enable-long-long --enable-shared --enable-threads --enable-languages=c,c++
>Description:

This testcase: 

=== Cut ===
class String
{
public:
    String();
    String( char *str );
    operator char *();
};

const String operator+( String s1, String ) // <- remove const here
{
  return s1;
}

String valGlue(const String before)
{
    String ret;
    return false ? ret : before + before;
}
=== Cut ===


does no longer compile:

$ g++ -c foo.cc
foo.cpp: In function `String valGlue(String)':
foo.cpp:18: error: non-lvalue in unary `&'

It does compile when removing the const in the marked place, so I'm not sure if this is a bug in the parser or by design. 


http://gcc.gnu.org/ml/gcc/2003-01/msg01643.html

seems to describe a similiar, however not identical problem. 



>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-05-05 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-05 21:11 c++/9537: [3.4 regression] [New parser] problem handling const return types jason
  -- strict thread matches above, loose matches on Subject: below --
2003-02-03 16:26 Wolfgang Bangerth
2003-02-03  1:36 Dirk Mueller
2003-02-02 22:32 bangerth
2003-02-01 21:06 mueller

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