This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: testsuite, simulators, and argv[0]


> I think a more relevant question is whether it's ok to pass 0, {NULL} for 
> argc, argv.

You can do that on desktop linux, you know:

      execl(some_prog_name, NULL);

argv[0] is NOT guaranteed to be non-NULL:

ISO/IEC 9899:1999(E) 5.1.2.2.1

2 If they are declared, the parameters to the main function shall obey
  the following constraints:

  - The value of argc shall be nonnegative.


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