Handling of main() function for freestanding
Arsen Arsenović
arsen@aarsen.me
Thu Oct 13 20:14:46 GMT 2022
On Thursday, 13 October 2022 19:24:41 CEST Jason Merrill wrote:
> I was arguing that we don't need the new flag; there shouldn't be any
> need to turn it off.
At the time, I opted to go with a more conservative route; I haven't
been around enough to have very strong opinions ;) I certainly can't
think of a way always adding a return can go wrong, but figured someone,
somehow, might rely on this behavior. Removed the flag and tested on
x86_64-pc-linux-gnu, v3 attached.
FWIW, there's precedent for treating main specially regardless of
flag_hosted (e.g. it's always marked extern "C" in the C++ frontend,
AFAICT).
--
Arsen Arsenović
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-0001-c-family-Implicitly-return-zero-from-main-even-on.patch
Type: text/x-patch
Size: 4981 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20221013/61c8f7f7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 358 bytes
Desc: This is a digitally signed message part.
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20221013/61c8f7f7/attachment.sig>
More information about the Gcc
mailing list