This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Aug 2012 23:35:06 +0000
- Subject: [Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.
- Auto-submitted: auto-generated
- References: <bug-54180-4@http.gcc.gnu.org/bugzilla/>
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.