AaronBallman wrote:

> There is a use case to pass customized arguments to main without using 
> -ffreestanding.

This is not motivating for C++ because that's not actually valid to do 
(https://eel.is/c++draft/basic.start.main#3.sentence-1), and it's only barely 
motivating for C (you can call `main` like a typical function, but I don't know 
that "we're baremetal but don't want to be freestanding" is something we have 
an explicit stance on supporting). C has constraints on what the signature of 
`main` can be if it's provided in a hosted environment, and not passing 
`-ffreestanding` means you're in a hosted environment, so I'm not certain what 
the value is of allowing this particular diagnostic to be downgradable but not 
doing the same for the other error diagnostics related to `main` like 
`err_main_returns_nonint`.

https://github.com/llvm/llvm-project/pull/85494
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to