public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/10468: Type interpreted as int& instead of const int&
@ 2003-04-23 21:47 bangerth
0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-04-23 21:47 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mgoodman, nobody
Synopsis: Type interpreted as int& instead of const int&
State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Wed Apr 23 21:47:56 2003
State-Changed-Why:
Why should it be different than what gcc does? Can you
point to a certain paragraph in the standard? I'd think
gcc is right.
Wolfgang
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10468
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: c++/10468: Type interpreted as int& instead of const int&
@ 2003-04-30 6:26 Mark Goodman
0 siblings, 0 replies; 3+ messages in thread
From: Mark Goodman @ 2003-04-30 6:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/10468; it has been noted by GNATS.
From: Mark Goodman <mgoodman@CSUA.Berkeley.EDU>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
mgoodman@csua.berkeley.edu, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: c++/10468: Type interpreted as int& instead of const int&
Date: Tue, 29 Apr 2003 23:22:50 -0700
bangerth@dealii.org wrote:
>Synopsis: Type interpreted as int& instead of const int&
>
>State-Changed-From-To: open->feedback
>State-Changed-By: bangerth
>State-Changed-When: Wed Apr 23 21:47:56 2003
>State-Changed-Why:
> Why should it be different than what gcc does? Can you
> point to a certain paragraph in the standard? I'd think
> gcc is right.
>
> Wolfgang
>
>http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10468
>
const typeof(x) t1& should be const int & not int & when x is an int.
AFAIK, typeof is a gcc extension so no I can't point to a certain
paragraph in the ISO C++ standard. If the template declaration is
removed and T is changed to an int, the code works just fine. I think
gcc is broken in this particular case. I have looked at finish_typeof
in gcc/cp/semantics.c but I don't see how to dump the tree from there.
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* c++/10468: Type interpreted as int& instead of const int&
@ 2003-04-23 20:36 mgoodman
0 siblings, 0 replies; 3+ messages in thread
From: mgoodman @ 2003-04-23 20:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 10468
>Category: c++
>Synopsis: Type interpreted as int& instead of const int&
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Wed Apr 23 20:36:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: mgoodman@csua.berkeley.edu
>Release: gcc version 3.4 20030423 (experimental)
>Organization:
>Environment:
Red Hat Linux 9
>Description:
gcc interprets the type of t1 as int& instead of const int& in the attached code.
The error shows up in the gcc-3_2-branch as well but the message is different.
The code compiles in gcc 2.95.3.
>How-To-Repeat:
gcc -c -o test test.ii
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.ii"
IyAxICJ0ZXN0LmNjIgojIDEgIjxidWlsdC1pbj4iCiMgMSAiPGNvbW1hbmQgbGluZT4iCiMgMSAi
dGVzdC5jYyIKdGVtcGxhdGUgPGNsYXNzIFQ+CnZvaWQgdGVzdChUIHQpIHsKICBpbnQgeCA9IDA7
CiAgY29uc3QgdHlwZW9mKHgpICYgdDEgPSB4KzA7Cn0KCmludCBtYWluKGludCBhcmdjLCBjaGFy
ICoqYXJndikgewogIHRlc3QoMCk7CiAgcmV0dXJuIDA7Cn0K
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-30 6:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 21:47 c++/10468: Type interpreted as int& instead of const int& bangerth
-- strict thread matches above, loose matches on Subject: below --
2003-04-30 6:26 Mark Goodman
2003-04-23 20:36 mgoodman
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).