This is the mail archive of the gcc-patches@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] |
This patch fixes PR 11584. The catch here is the standard is somewhat underspecified. The testcase checks iword(100), because in our implementation, iword(1) will always succeed. The way I read the standard, this is ok, since even though new is overridden, the allocation of space for iword(1) didn't fail.
Martin, does this solution make sense to you?
I think the solution is fine. My only suggestion would be to also guard against negative indices in the two inline member functions (it seems that a negative index might cause trouble when using it to dereference an _M_words array element).
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |