C++ Logo

sg12

Advanced search

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

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 22 Jan 2014 12:07:59 +0200
On 22 January 2014 09:13, Stephen Clamage <stephen.clamage_at_[hidden]> 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.

Received on 2014-01-22 11:08:00