This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: envp corrupted in Interix gcc


"Jerry Miller" <gmiller@cs.sunysb.edu> writes:

> #include <stdio.h>
> 
> main(int argc,char*argv[],char **envp)
> {
> printf("%p\n",envp);
> printf("%p\n",envp[0]);
> }

The envp parameter doesn't exist according to the C standard, and it's
not portable.  The GNU/Interix runtime environment (of which GCC is
only one part) obviously doesn't call main() with this parameter.

Strictly speaking, this is not a GCC issue.

-- 
Florian Weimer 	                  Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart           http://cert.uni-stuttgart.de/
RUS-CERT                          +49-711-685-5973/fax +49-711-685-5898


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]