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++/54180] a bug using strcat function - it depends on variable declare order, but it should not.


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.


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