This is the mail archive of the gcc-bugs@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]

[Bug c++/35594] using vector::resize within a recursive function causes a crash



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-03-14 21:26 -------
               out.at(at++) = append( count-1, out );

I think the issue here is the order of evaluation of the lhs and the rhs is
unspecified so we are evaluating out.at(at++) first and then append( count -1,
out) which causes us to use the old value which is no longer valid.

So this is not a bug.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]