[ub] What does "The function main shall not be used within a program" mean?

Ville Voutilainen ville.voutilainen at gmail.com
Wed Jan 22 11:07:59 CET 2014


On 22 January 2014 09:13, Stephen Clamage <stephen.clamage at oracle.com> wrote:
> All issues of the standard explicitly forbid calling main recursively, in 5.2.2/9.

Thanks. Minor nit: it says
"Recursive calls are permitted, except to the function named main  (3.6.1)."
Since there's that cross-reference, it's otherwise correct, but I'd prefer it
to say "to the main function" instead of "to the function named main", since
nothing prevents me from having functions named main in user-defined namespaces
or as member functions of classes. That's perhaps not a topic for this
particular
study group, though.


More information about the ub mailing list