This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/10468: Type interpreted as int& instead of const int&


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
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]