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

pinskia at physics dot uc dot edu gcc-bugzilla@gcc.gnu.org
Fri Jul 11 21:14:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-11 21:14:25
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-11 21:14 -------
Well now on the mainline (20030711), it does say what the template is instantiated as 
because it errors on declaration of the template but you can reproduce this bug with the 
following code:
template <class T> struct test_type { static void dump() {typename T::t a;} };

int i;
int main() {
  int& int_ref = i;
  test_type<typeof(int_ref)>::dump();
}



More information about the Gcc-bugs mailing list