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


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();
}


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