[Bug c++/44399] Problem with command line arguments in windows
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-06-03 12:29 --- This is a problem of your execution environment, not GCC. And AFAICS your observerd behavior is what is expected. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399
[Bug c++/44399] Problem with command line arguments in windows
--- Comment #2 from alexandrfedorov at gmail dot com 2010-06-03 12:50 --- I'm executing my application via cmd.exe from Windows XP. As i know in windows NOTHING is escaping with backslash. Standard utilities like cacls.exe working well with such arguments. Please pay attention to this problem. -- alexandrfedorov at gmail dot com changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399
[Bug c++/44399] Problem with command line arguments in windows
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-06-03 13:18 --- GCC does not have any influence on how arguments are split, it is your execution environment (including the runtime, which might be cygwin or mingw). This is not a GCC bug, please do not reopen it. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399
[Bug c++/44399] Problem with command line arguments in windows
--- Comment #4 from jwakely dot gcc at gmail dot com 2010-06-03 13:24 --- If it's a cygwin executable the behaviour might be caused by cygwin's globber In any case, it's not gcc -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399
[Bug c++/44399] Problem with command line arguments in windows
--- Comment #5 from pinskia at gmail dot com 2010-06-03 13:48 --- Subject: Re: New: Problem with command line arguments in windows Sent from my iPhone On Jun 3, 2010, at 5:15 AM, alexandrfedorov at gmail dot com gcc-bugzi...@gcc.gnu.org wrote: I'm trying to write windows console application working with directories, and i discover that arguments processed not right. For example: #include iostream int main ( int argc, char *argv[], char *envp[] ) { std::cout you have argc arguments; } resulting: a.exe a a you have 2 arguments This is correct because the first argument is a.exe. a.exe a a a you have 3 arguments a.exe a a\ a you have 2 arguments As i understand, backslash is escaping double quote and we have [a a a] argument instead of [a a\],[a]. It's very sad, because i must operate with directories or UNC paths like: \\serv\share\some dir with spaces\ where double quotes is required and backslash can be present. Quoting long file paths with double quotes and backslashes in paths is a common thing in windows console programs. -- Summary: Problem with command line arguments in windows Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: alexandrfedorov at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44399