------- Comment #3 from paolo dot carlini at oracle dot com  2009-07-16 22:01 
-------
> s1.append(s.data() - 1, 5);

What's s? If, as I believe, it's a std::basic_string - s1, s2, whatever - on
which you are calling the data member function, the line is definitely illegal,
because s.data() - 1 doesn't point to a char belonging to the string. Actually,
what's so special about -1? If that line were legal you could pass to append
*any* address, meaningless.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40779

Reply via email to