https://sourceware.org/bugzilla/show_bug.cgi?id=19310

--- Comment #2 from dcb <dcb314 at hotmail dot com> ---
>will this do the trick ?

It certainly seems to shut up cppcheck, the static analyser.

Not sure how to get gcc or clang to detect this problem.

$ cat dec4a.cc

extern void g( const char *);

void
f( const char * start, unsigned long ul)
{
        if (start + ul < start)
                g( start);
}

$ ~/gcc/results/bin/gcc -c -O2 -Wall -Wextra -Wtype-limits dec4a.cc
$ ~/llvm/results/bin/clang++ -c -O2 -Wall dec4a.cc
$

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to