From: Manfred Spraul <manfred@colorfullife.com>
To: gcc@gcc.gnu.org
Subject: strict alias analysis question
Date: Tue, 14 Oct 2003 17:02:00 -0000 [thread overview]
Message-ID: <3F8C29C4.2050406@colorfullife.com> (raw)
Hi,
the latest gcc versions generate warnings about potentially dangerous
pointer casts if strict alias analysis is enabled.
Right now two groups of warnings are generated: several from the
inlined MemSet macros:
#define MemSetLoop(start, val, len) \
do \
{ \
int32 * _start = (int32 *) (start); \
int32 * _stop = (int32 *) ((char *) \
_start + (Size) (len)); \
\
while (_start < _stop) \
*_start++ = 0; \
} while (0)
And a few from structures with common headers:
struct hdr {
...;
}
struct b {
struct hdr info;
...
};
void handler(struct hdr* parm)
{
struct b* ptr = (struct b*)parm;
}
Does MemSet break the rules for strict alias analysis? And what about
manual base classes? The actual use it a bit longer (the cast to (Node
*) in src/backend/commands/tablecmds.c generates the warning).
--
Manfred
next reply other threads:[~2003-10-14 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-14 17:02 Manfred Spraul [this message]
2003-10-14 20:58 ` Mike Stump
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=3F8C29C4.2050406@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=gcc@gcc.gnu.org \
/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).