There is no c standard library. It's all compiler internals. What a bloated dogshit language. Even tcc implements these builtins. What a joke. I'm fucking PISSED I've been lied to
Standard libs are bloat
>>106440443???purity spiral?why WOULDNT you want compiler intrinsics? (abstracting from the fact varargs exist bc of asm-level manipulation)
>>106440457wrappers for syscalls are nice for beginnersalso portability. if one needs it
>>106440461Why not a fucking __builtin for printf fagwad. You already have $ARCH for any nontrival c program DEBUGABILITY, PORTABILITY, MAITENCE, COMPLEXITY. If it's just code it's just code. The less magic bullshit in the world the better.
>>106440443basedI simply don't like reading __
>>106440483>If it's just code it's just codeits all *machine code. nuancesare you gonna bark at pointers too?bc these are also an abstraction, y'know...a compiler intrinsic if you will
>>106440491That's part of the langauge. There are things that SHOULD be part of the language those things should go in the compiler. THING THAT AREN'T PART OF THE LANGUAGE SHOULD STAY OUT!
>>106440522varargs are also part of the languagebc the standard lib is defined in the standard ¯\_(ツ)_/¯i certainly dont mind iti suck at asm and thats why i do c (never bothered to learn asm properly)
>>106440522also if you go with vanilla C youre missing out on low hanging fruit performancelike force inlineswhich are great organizational tools for code clarity tooyou can extract all your spaghetti from more complex loops at zero runtime cost
>>106440491If you know assembly you know what pointers compile to, if you try to read any code that use va_list you have to go read your compiler source to figure out what it's doing. >>106440550The standard library is not part of the language retard. It's a library, it's in the name.>>106440564Useless shit. Compilers can never affect more than 10% of your performance.
>>106440522also cpu intrinsics are not standardand while you could just go with -march flags for hot loops id rather vectorize the code myself
>>106440574>>>106440550 (You)>The standard library is not part of the language retard. It's a library, it's in the name.^das retarded, otismostadard lib is why c is portable in the first placelook it up im not gonna spoonfeed you>>>106440564 (You)>Useless shit. Compilers can never affect more than 10% of your performance.this is also, retarded. perhaps even morelet me rephrase that for you:>avx2 never affects more than 10% of your performance>>106440577now shut the fuck up and go back to your code
>>106440595Amazing. Everything you just posted was wrong.
>>106440631>didnt even look it upproof autism is a hard retardationholy fuck youre slowand retardedtotal autismo trash recycling
>>106440636RETARD!>The c programming language STANDARDYou fucking retard. Not the language. Go be braindead trash elsewhere please.
>>106440636>>106440595>implying c is somehow less portable when you don't use the "stadard lib"Retard alert
>>106440659>#include <stdarg.h>holy mental retardyoure not even internally consistentgo play with legos or something
>>106440678You are just too retarded to understand the point. Again, give a single coherent argument for any function internal to a compiler I'll wait. And no "I don't know how to write it" isn't an answer. What's next you want all of stdlib inside a driver? kill yourself.
>>106440706no, i understand it very wellbut you lack mental flexibility and your brain segs on basic levels of abstractionnot in the programming sense, conceptual abstractionyoure worthlessgo play with legos, or count some matches
>>106440713Waiting. Why don't you tell me why stdlib isn't in the compiler, why don't you tell me why it's not a driver. If you can figure out simplicity maybe you'll be able to write real code one of these days.
>>106440720waiting for what?>why isnt the sdtlib in the compilerwhy would it be, mong?floor is yours
>>106440491If you're project doesn't use pointers you don't need c. >>106440730BECAUSE NOT EVERY PROJECT NEEDS STDLIB YOU RETARD
>>106440742>digression>strawmensee, there was nothing to be addressedif you have fuck all to say, shut the fuck up
>>106440753>digressionThe entire point of the thread, why did you click on it if you couldn't understand it. Now fuck off.
>>106440759fuck your threadi won kek
>>106440769>>106440595Learning "compiler hints" is an unnecessary waste of headspace, a compiler is a tool, not a crutch for you to ignore real programming. Either the compiler should handle vectorization automatically and stay out of my way or not support it at all. In reality these hints only matter on a very very small number of cases as it will usually succeed automatically. Further proving the uselessness of compiler internals.
>>106440794>>106440595And again. Memory is 100-1000x times slower, no matter how wide you go you aren't getting more than 10% free performance from a compiler.
>>106440794nononot compiler hintsimmintrin.hit maps to asm very closelyanyways if you limit yourself to vanilla c ur gae and you're code will be slowi, for one cant live without force inlinesc turns into a high level languagefukken python and shit
>>106440808>immintrin.hThat uses built-ins prove it doesn't I'll wait.
>>106440829>That uses built-ins prove it doesn't I'll wait.who tf cares?sizeof is an inbuilt>prove me your code doent use itwhats the purpose?what matters is the assembly you get and the means you used to get there>b-but purity spirala thing for autists, tranies, and reddit
disable builtin and linking libcbuild glibc and musl(in case one stops working) as part of your project and static link it
>>106440877Static link what? musl won't build without builtins OBVIOUSLY. The correct response is to copypaste these builtins out of tcc into the std library implimentation and a builtinlibrary when not defined by the standard, then to simplify tcc/gcc/clang.
ship your own syscall interfacebecome ungovernable
>>106440720With some compilers, parts of stdlib can be compiler intrinsics. Functions like memcpy or memset for examples.va_args is a standardized shorthand for messing about with the stack, which would otherwise need to be done with assembly language. Check out how longjmp works for more stack oddness. Standards don't cover everything, the way they're implemented can be implementation specific.
In case you were wondering this is how va_list is defined in plan 9typedef char* va_list;
>>106441218Makes sense, variadic functions are such a rare case, even while debugging, that I'd doubt it's worth the hassle. And in the extremely rare cases that it does you can just convert them to fixed functions.