Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: [clang] -Os invalid content of argc+argv |
| Date | 2015-09-03 16:43 -0700 |
| Organization | None to speak of |
| Message-ID | <lnbndjqda9.fsf@kst-u.example.com> (permalink) |
| References | <68a9e68b-dc3b-4c5e-8d01-bc91daaeb0f2@googlegroups.com> <20150903233124.38258cdb@maxa-pc> |
Melzzzzz <mel@zzzzz.com> writes:
[...]
> I don't know about cygwin but argc/argv values are parsed with crt
> on Linux. That is if you link with c runtime and write main in assembler
> you get already parsed values eg Linux passes values on stack but crt
> parses them into rdi,rsi registers...
> Probably on cygwin compiler parses those values therefore bug.
The command line is parsed by the shell, which then passes them to your
program using one of the exec*() functions.
The compiler doesn't parse your program's command line arguments
(because they don't exist yet). It merely generates code that is able
to receive those arguments via the argc and argv parameters.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[clang] -Os invalid content of argc+argv m.labanowicz@gmail.com - 2015-09-03 13:28 -0700
Re: [clang] -Os invalid content of argc+argv Melzzzzz <mel@zzzzz.com> - 2015-09-03 23:31 +0200
Re: [clang] -Os invalid content of argc+argv Keith Thompson <kst-u@mib.org> - 2015-09-03 16:43 -0700
Re: [clang] -Os invalid content of argc+argv Melzzzzz <mel@zzzzz.com> - 2015-09-04 01:53 +0200
Re: [clang] -Os invalid content of argc+argv Philip Lantz <prl@canterey.us> - 2015-09-03 20:15 -0700
Re: [clang] -Os invalid content of argc+argv Keith Thompson <kst-u@mib.org> - 2015-09-04 09:15 -0700
Re: [clang] -Os invalid content of argc+argv m.labanowicz@gmail.com - 2015-09-04 10:33 -0700
Re: [clang] -Os invalid content of argc+argv Noob <root@127.0.0.1> - 2015-09-04 20:48 +0200
csiph-web