Topic: Allowed main() prototypes


Author: kanze@gabi-soft.fr (J. Kanze)
Date: 1997/10/01
Raw View
David R Tribble <david.tribble@central.beasys.com> writes:

|>  Among the various prototypes allowed for main() in a conforming C++
|>  program (according to the draft, 3.6.1), I am curious as to why these
|>  were left out:
|>
|>      int  main(int argc, const char *const *argv);
|>      int  main(int argc, const char *const *const argv);

C compatibility?  According to the C standard (5.1.2.2.1): "The
parameters argc and argv and the strings pointed to by the argv array
shall be modifiable by the program, and retain their last-stored values
between program startup and program termination."  (Curiously, the
actual array to which argv points to does not seem to be covered, only
argv itself and the strings the array points to.  I'm pretty sure that
this is an oversight, however.)

--
James Kanze    +33 (0)1 39 23 84 71    mailto: kanze@gabi-soft.fr
GABI Software, 22 rue Jacques-Lemercier, 78000 Versailles, France
        I'm looking for a job -- Je recherche du travail
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: David R Tribble <david.tribble@central.beasys.com>
Date: 1997/09/30
Raw View
Among the various prototypes allowed for main() in a conforming C++
program (according to the draft, 3.6.1), I am curious as to why these
were left out:

    int  main(int argc, const char *const *argv);
    int  main(int argc, const char *const *const argv);


--------------------.      BEA Systems, Inc. ,-.  +1-972-738-6125 Office
David R. Tribble     \   ,------------------'   \ +1-972-738-6111 Fax
http://www.beasys.com `-'  Dallas, TX 75248      `-----------------------
david.tribble@noSPAM.beasys.com            http://www.flash.net/~dtribble
-------------------------------------------------------------------------
Support the anti-Spam amendment, join at http://www.cauce.org/
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]