Re: pointer reference comparing with int in gcc 4.1.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux