public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/15510] New: getopt()  do NOT REORDER the argv[] when specify the -std=c99 option
@ 2013-05-21 15:46 1533963612 at qq dot com
  2013-05-21 17:00 ` [Bug libc/15510] " schwab@linux-m68k.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: 1533963612 at qq dot com @ 2013-05-21 15:46 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/15510] getopt()  do NOT REORDER the argv[] when specify the -std=c99 option
  2013-05-21 15:46 [Bug libc/15510] New: getopt() do NOT REORDER the argv[] when specify the -std=c99 option 1533963612 at qq dot com
@ 2013-05-21 17:00 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: schwab@linux-m68k.org @ 2013-05-21 17:00 UTC (permalink / raw)
  To: glibc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2013-05-21 17:00:37 UTC ---
To get the GNU style getopt use <getopt.h> or define _GNU_SOURCE.

-- 
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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/15510] getopt()  do NOT REORDER the argv[] when specify the -std=c99 option
  2013-05-21 15:46 [Bug libc/15510] New: getopt() do NOT REORDER the argv[] when specify the -std=c99 option 1533963612 at qq dot com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: ondra at iuuk dot mff.cuni.cz @ 2013-06-11 16:18 UTC (permalink / raw)
  To: glibc-bugs

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

OndrejBilka <ondra at iuuk dot mff.cuni.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ondra at iuuk dot mff.cuni.cz
         Resolution|---                         |INVALID

--- Comment #2 from OndrejBilka <ondra at iuuk dot mff.cuni.cz> ---
Closing as Andreas pointed out.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/15510] getopt()  do NOT REORDER the argv[] when specify the -std=c99 option
  2013-05-21 15:46 [Bug libc/15510] New: getopt() do NOT REORDER the argv[] when specify the -std=c99 option 1533963612 at qq dot com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-13 17:41 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-13 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 15:46 [Bug libc/15510] New: getopt() do NOT REORDER the argv[] when specify the -std=c99 option 1533963612 at qq dot com
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

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).