This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13325] New: [tree-ssa] Weird warning on memcpy(d, s, 0)
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2003 22:29:02 -0000
- Subject: [Bug c/13325] New: [tree-ssa] Weird warning on memcpy(d, s, 0)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc (GCC) 3.5-tree-ssa 20031205 (merged 20031130) on alphaev68-unknown-linux-gnu
falk@juist:/tmp% cat test.c
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
void f (void *dest, const void *src) {
memcpy (dest, src, 0);
}
falk@juist:/tmp% gcc -c -W test.c
test.c: In function `f':
test.c:3: warning: statement with no effect
Well yeah, it has no effect, but things like these are often created by macros.
It seems unlikely that it marks a real mistake. Similar for memcmp etc.
--
Summary: [tree-ssa] Weird warning on memcpy(d, s, 0)
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: diagnostic
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13325