From: Andrew Haley <aph@redhat.com>
To: Russell Shaw <rjshaw@netspace.net.au>
Cc: gcc-help@gcc.gnu.org
Subject: Re: warning: comparison with string literal results in unspecified behaviour
Date: Tue, 22 Jan 2008 13:45:00 -0000 [thread overview]
Message-ID: <47949806.2050001@redhat.com> (raw)
In-Reply-To: <47948001.2050402@netspace.net.au>
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.
prev parent reply other threads:[~2008-01-21 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 11:20 Russell Shaw
2008-01-21 21:59 ` Andrew Haley
2008-01-22 11:29 ` Russell Shaw
2008-01-22 12:32 ` Andrew Haley
2008-01-22 12:48 ` Russell Shaw
2008-01-22 13:25 ` Russell Shaw
2008-01-22 13:31 ` Russell Shaw
2008-01-22 13:45 ` Andrew Haley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47949806.2050001@redhat.com \
--to=aph@redhat.com \
--cc=gcc-help@gcc.gnu.org \
--cc=rjshaw@netspace.net.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).