public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "1533963612 at qq dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15510] New: getopt()  do NOT REORDER the argv[] when specify the -std=c99 option
Date: Tue, 21 May 2013 15:46:00 -0000	[thread overview]
Message-ID: <bug-15510-131@http.sourceware.org/bugzilla/> (raw)

http://sourceware.org/bugzilla/show_bug.cgi?id=15510

             Bug #: 15510
           Summary: getopt()  do NOT REORDER the argv[] when specify the
                    -std=c99 option
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: 1533963612@qq.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 7035
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7035
the source code,  complie it with and without -std=c99 to see the difference

using the code show in getopt(3), complie it using gcc c99 option(-std=c99),
then if we input like this:
./a.out name -t 10
the getopt() can not find the -t option and its value. it just stop at name.

but if we complie it without -std=c99, things get right, we will get the -t and
its value, and name is reorder at last position.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


             reply	other threads:[~2013-05-21 15:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 15:46 1533963612 at qq dot com [this message]
2013-05-21 17:00 ` [Bug libc/15510] " schwab@linux-m68k.org
2013-06-11 16:18 ` ondra at iuuk dot mff.cuni.cz
2014-06-13 17:41 ` fweimer at redhat dot com

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-15510-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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).