This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13325] New: [tree-ssa] Weird warning on memcpy(d, s, 0)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]