public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lirex.software at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/54180] a bug using strcat function - it depends on variable declare order, but it should not.
Date: Sat, 18 Aug 2012 21:29:00 -0000	[thread overview]
Message-ID: <bug-54180-4-8fu51L471C@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54180-4@http.gcc.gnu.org/bugzilla/>

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

Denis Kolesnik <lirex.software at gmail dot com> changed:

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

--- Comment #17 from Denis Kolesnik <lirex.software at gmail dot com> 2012-08-18 21:28:56 UTC ---
(In reply to comment #11)
> Also, you declare SQL_date_begin[10] then fill it with 11 characters
> (YYYY-MM-DD plus the numm terminator) and do the same with SQL_date_end
> 
> This is horrible, horrible code and should be deleted immediately.
> 
> (In reply to comment #5)
> > it should work without problems, because of programming language syntax which
> > is a standart.
> > But it works so, that SQL1 partially overwrites value of SQL_date_begin and
> > values are
> > not such as expected.
> 
> Please check the standard before arguing about it. The C standard states that
> for the functions in <string.h> "If an array is accessed beyond the end of an
> object, the behavior is undefined."  
> 
> To understand undefined behaviour see:
> http://en.wikipedia.org/wiki/Undefined_behavior
> 
> 
> > I never heard, that the "C" language is outdated. The "C++" is just another
> > standart which includes
> > the syntax of "C".
> 
> Noone said it's outdated, what on earth are you talking about?
> 
> > So I consider it is as an GCC error which should be fixed, also because all
> > standart libraries
> > come along with GCC.
> 
> No, the strcat and strcpy functions come from the C library provided by your
> OS, they do not come from GCC. If you still believe there is a bug then maybe
> you should report it to Microsoft instead.

thank you for understandable answer!


  parent reply	other threads:[~2012-08-18 21:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 15:03 [Bug c++/54180] New: " lirex.software at gmail dot com
2012-08-05 15:08 ` [Bug c++/54180] " lirex.software at gmail dot com
2012-08-05 15:11 ` lirex.software at gmail dot com
2012-08-05 15:12 ` schwab@linux-m68k.org
2012-08-05 15:13 ` lirex.software at gmail dot com
2012-08-09 23:19 ` lirex.software at gmail dot com
2012-08-09 23:22 ` pinskia at gcc dot gnu.org
2012-08-09 23:33 ` lirex.software at gmail dot com
2012-08-09 23:35 ` pinskia at gcc dot gnu.org
2012-08-10 14:16 ` lirex.software at gmail dot com
2012-08-10 14:51 ` redi at gcc dot gnu.org
2012-08-10 15:04 ` redi at gcc dot gnu.org
2012-08-16 22:26 ` schwab@linux-m68k.org
2012-08-16 22:35 ` lirex.software at gmail dot com
2012-08-16 23:00 ` pinskia at gcc dot gnu.org
2012-08-17  0:03 ` redi at gcc dot gnu.org
2012-08-18 21:16 ` lirex.software at gmail dot com
2012-08-18 21:29 ` lirex.software at gmail dot com [this message]
2012-08-18 22:07 ` lirex.software at gmail dot com
2012-08-18 22:12 ` lirex.software at gmail dot com
2012-08-18 22:19 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-54180-4-8fu51L471C@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).