------- 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