This is the mail archive of the gcc-bugs@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]

[Bug c++/10243] typeof(expr) yields wrong result if expr has reference type


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-12 06:44 -------
Here is a better example (this should link):
template <class T> struct test_type { static void dump(); };
template <> void  test_type<int&>::dump(){}
int i;
typedef int &t;
int main() {
  int& int_ref = i;
  test_type<t>::dump();
  test_type<typeof(int_ref)>::dump();
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
   Last reconfirmed|2003-07-11 21:14:25         |2004-01-12 06:44:16
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10243


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