[Bug tree-optimization/43270] array-bounds false negative
matt at use dot net
gcc-bugzilla@gcc.gnu.org
Fri Mar 5 22:17:00 GMT 2010
------- Comment #4 from matt at use dot net 2010-03-05 22:17 -------
It's not the fact that it's zero-sized in and of itself, but rather the
assignment to contents[0] in the ctor should trigger the warning. Oddly,
PC-Lint warns of the zero-sized array, but not the actual overflow.
As a test, I tried changing the ctor assignment to contents[1], and the warning
still isn't triggered in either GCC or PC-Lint.
Whatever this blind spot is, it's in both tools.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270
More information about the Gcc-bugs
mailing list