me22 wrote: > > On Mon, Dec 15, 2008 at 22:30, yangch <yangchanghua@xxxxxxxxx> wrote: >> >> void f(str_t const &s) >> { >> printf("sizeof s:%d\n",sizeof(s)); >> if(s) >> printf("%s\n",s); >> } >> >> test.cc: In function 'void f(const char (&)[10])': >> test.cc:9: error: invalid operands of types 'const char (&)[10]' and >> 'int' >> to binary 'operator!=' >> > > I think it's just a bug in 4.1.2. It compiles fine in 4.3.1. > > HTH, > ~ Scott > > P.S. Rather odd that it talks about != there... > > Do you know the bug number or name ? -- View this message in context: http://www.nabble.com/pointer-reference-comparing-with-int-in-gcc-4.1.2-tp21026658p21027430.html Sent from the gcc - Help mailing list archive at Nabble.com.