From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13892 invoked by alias); 21 May 2013 15:46:29 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 13493 invoked by uid 48); 21 May 2013 15:46:24 -0000 From: "1533963612 at qq dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: 1533963612 at qq dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00176.txt.bz2 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.