[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Aug 9 23:35:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54180
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-08-09 23:35:06 UTC ---
(In reply to comment #7)
> all those variables are defined, otherwise it would not compile. The main is,
> that it is normal(both cases) for the "C" language syntax and both declaration
> orders should work.
With the correct lengths? Writing past the array bounds in both C and C++ is
not required a diagnostic, it just invokes undefined behavior.
More information about the Gcc-bugs
mailing list