Re: warning: comparison with string literal results in unspecified behavior [-Waddress]

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

 



On Mi, Okt 10, 2018 at 12:38:56 +0300, Alexander Monakov wrote:
> On Wed, 10 Oct 2018, Josef Wolf wrote:
> > Is there any reason, that a pointer to a string literal can change?
> 
> If you have two string literals in your program, their addresses may be
> different even if the two literals have identical contents.

Argh!

I've overseen that the macro duplicates the literal.

Thanks for the hint!

-- 
Josef Wolf
jw@xxxxxxxxxxxxx



[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