c++/10569: use typedef type as return from main yields warning
Geoff Keating
geoffk@geoffk.org
Wed Apr 30 21:37:00 GMT 2003
bangerth@dealii.org writes:
> An implementation shall not predefine the main function. This func-
> tion shall not be overloaded. It shall have a return type of type
> int,...
> I can't say whether this rules out having a typedef to
> int instead. I think the answer is: don't do it, there's
> no good reason for such bogosity.
The standard does permit this. Typedefs are just names for existing
types, not new types, and so can be used anywhere that the type could
be used.
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc-bugs
mailing list