https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118136

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So in summary the following is the point.

If you are defining your custom start function, it becomes a non-hosted env
and/or implemented defined area. This means it can't be LTO'ed since it can't
constrained by the hosted env part of C since C defines start being main for
hosted env.

For a free-standing env in C, then the rules for main don't apply and the
standard C function rules apply for functions called main and you are just
doing undefined behavior like any other function would be.

You can't be both free-standing and hosted at the same time. You have chose
between the 2.

Reply via email to