tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: C compiler (over-)optimization (was: netbsd-11 gcc bug)



Sorry for the top post, and please excuse any thumb-o’s.

100% agree that compiler lock-in is bad and that we should strive to be as compiler-agnostic as possible.  (I have other thoughts on the compiler topic, but I’m in an airport bar typing on my phone, so that will have to wait.)

With GCC, it certainly used to be that -ffreestanding was sufficient to disable some of the egregious stuff that gave the kernel ulcers, but I’m not sure that’s the case anymore, and in my own silly not-really-hosted-C endeavors, I have decided that’s a battle I’m no longer willing to fight.

-- thorpej
Sent from my iPhone.

> On May 31, 2026, at 12:02 PM, Andrew Cagney <andrew.cagney%gmail.com@localhost> wrote:
> 
> 
>> 
>> Maybe we go back to PCC and make sure it evolves to conform to a variant
>> of C where there is no UB -- only IDB, i.e. as you said, the compiler
>> explicitly defines semantics for everything that the C Lawyers call UB.
> 
> That runs the risk of compiler and language lock-in.
> 
> I'm more worried about things like this:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125524


Home | Main Index | Thread Index | Old Index