A survey of 6 libc implementations showed literally every one uses GCC extensions throughout. It's literally impossible to have a working C toolchain which is based on the published standard


@sir wow, it looks like GNU embraced the C Programming Language, extended it with their improvements and now a standards compliant compiler cannot compile a large amount of code...

@leo @sir it remembers me when Linux was only compilable with GCC bc of the VLAs - not sure if it's now possible to compile it using e.g. Clang.

@nifker @leo it's much closer, but still not there - and the reason is not because Linux shaped up but because Clang added GNU extensions

@sir @leo But VLAs are not allowed by the standard IIRC.

@nifker @leo ...no, VLAs are a totally standard feature of C11.

@leo @xj9 @sir I'm not sure such thing as a standard-compliant C compiler even exists. First, because very few people actually bother with buying a copy of the standard (yes, you have to pay for it) and instead use drafts. Second, because the standard is quite vague on many things, so it is possible for different implementations to be incompatible despite both being implemented according to the same standard (or its draft).

TL;DR C is a mess.

@newt @leo @xj9 even a compiler which (1) implements the draft and (2) doesn't hit any vague edge cases, will not be able to compile almost any software at all because of GNU extensions which permeate the ecosystem. I can't even find a libc which doesn't use GNU extensions.

@sir @leo @xj9 it cannot not hit the vague parts, otherwise it doesn't implement the standard completely. But I understand what you mean.

I completely agree with @newt on this one:
If the American National Standards Institute cannot provide a compiler of their own, it's not standard at all, but a dream pipe.
@leo legit made me glee. Still look red.
@xj9 @sir
Sign in to participate in the conversation

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !