Re: warning: comparison with string literal results in unspecified behaviour

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

 



Russell Shaw wrote:
Russell Shaw wrote:
Russell Shaw wrote:
Andrew Haley wrote:
Russell Shaw wrote:
Andrew Haley wrote:
Russell Shaw wrote:
How do i disable that? My code explicitly compares string pointers.

...

Scrap that example. ob3->magic == MAGIC is two separate strings.

My code is full of that problem and has been relying on gcc combining
identical strings into one address. It has worked, but probably isn't
guaranteed.

It definitely isn't guaranteed.  :-)

I'll change to some kind of internment thing. Thanks for
the help.

Cool, good luck.

Andrew.

[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