Remix.run Logo
tavavex 8 hours ago

Does your compiler replicate 100% of gcc's functionality? I've heard of similar compiler projects skimping on the lesser used functions and taking shortcuts. gcc is BIG.

But the real point is even if we get an ability to AI generate an accurate and fully-featured C compiler from scratch, everyone will keep using gcc. C compilers are solved, gcc is already here and it's pretty amazing. It's not flawed or in need of replacement, there's nothing for it to fall far behind on. We don't need another C compiler, the reason why AI users are attracted to the topic is just to "look ma, no hands!". And using gcc also ensures that I'm using something that has been looked at by thousands of qualified eyes in the past and will be looked at by thousands more for the foreseeable future. Will an AI compiler be comprehensible in ten years? Will every update be guaranteed to be better than the previous?

rurban 8 hours ago | parent [-]

Of course not. I don't care for gcc's broken optimizer to remove dead code without any warning.

gcc has too many bugs for my taste, sorry. And I don't want to wait 20m on gcc compilation, when tcc can do it in 1m.

tavavex 7 hours ago | parent [-]

If you're just declaring gcc broken and removing its functionality, then why compare yourself to it? For any of the metrics you're using to hold water, you want the project to actually be comparable to gcc in terms of features, otherwise you could just remove half of their features and declare yourself as more efficient because half of gcc would compile faster than gcc.

And why are you talking about the optimizer? What I'm curious about is whether this compiler will successfully compile any project that can be compiled with gcc. Will it?

In addition to build time comparisons not meaning anything if the projects aren't equivalent, I also just don't get why it's so important. Most people don't spend their days recompiling gcc, they just want it to compile their projects quickly and accurately.

rurban 7 hours ago | parent | next [-]

It compiles the kernel and my big projects, but I haven't released it yet.

Feature wise I don't do bitint, decimal and FloatX. No auto-vectorization, but better than most simd/neon projects, which don't use __attribute__((vector_size(N))). Manual vectorization.

no sanitizers nor flto.

rcc is for the people who want to compile their projects sanily, and fast. And who want to find unicode attacks. And for those who run into tcc bugs, there are many still. gcc and clang are insanily slow.

cozzyd 7 hours ago | parent | prev [-]

C compilers are already so fast... Now a fast C++ or rust compiler would be useful.