From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 466 invoked by alias); 30 Apr 2003 06:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 451 invoked by uid 71); 30 Apr 2003 06:26:01 -0000 Date: Wed, 30 Apr 2003 06:26:00 -0000 Message-ID: <20030430062601.450.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Mark Goodman Subject: Re: c++/10468: Type interpreted as int& instead of const int& Reply-To: Mark Goodman X-SW-Source: 2003-04/txt/msg01435.txt.bz2 List-Id: The following reply was made to PR c++/10468; it has been noted by GNATS. From: Mark Goodman 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