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]

farg


Hello!!

Please look at this:

#include <iostream.h>

struct S
{  int a;
   S(int x):a(x){}
};

void fun(S* s, S& z)
{
   cout<<(*s).a<<" "<<z.a<<endl;
}

main()
{
   S o(11);
   fun(&S(10),o);
   fun(&o,S(10));  // !!!
   return 0;
}

g++-2.95.2 gives me some errors in line marked with "!!!".
Why?? It shoudn't be problems with this.

Maciej Hrebien




-- 
 


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