Should I switch from gcc/g++ to clang/llvm? Pros/cons?

Should I switch from gcc/g++ to clang/llvm? Pros/cons?

Attached: download (1).png (1200x901, 336K)

use both

Llvm compiles faster but GCC binaries see faster at runtime

Yes for development. Better warning/errors, static analysis and tooling overally.
For release, just compile with both and see which produces faster code. I usually don't bother and use clang.

Pros:
>asan, ubsan, tsan
>clang-format
>clang-tidy
>cross-compilation without recompiling the whole compiler

Cons:
>no assembly IR
>harder to compile from source
>probably slightly slower

not sure how llvm debugger stands

dunno how to work with ThinLTO, might be another pro for clang, but tho docs are poor

both support the common extensions

Just use both and switch as needed. I use clang with sanitizers for testing.

Please avoid non-copyleft software, user. It doesn't protect your freedoms.

Attached: rms.jpg (750x500, 128K)

>clang-format
>clang-tidy
Those are not a pro. You can use them with GCC too.

First post, best post.
Write standard and portable C, and use build systems that support both.

Is there any comfortable way how to pass some flags or something into makefile so i can always make whichever clang or gcc binary I want?

Nothing about make is comfortable, use scons or cmake or at least automake/autotools.

Why tho

well billy, one is a low level virtual machine, and the other is native. so one has the overhead of virtualization

What? LLVM is by no means a low-level virtual machine. The initialism "LLVM" is dated.

ADD_FLAGS=-pedantic make
In makefile:
CFLAGS = ...
CFLAGS += ADD_FLAGS

No. clang is slow, buggy and autistic about posix which leads to less features and more trouble. The only reason people pish clang is because of its proprietary friendly license.

Virtual machine does not imply not-native. It used to refer to machine specifications as a simplified model of real variety of hardware. In this sense standars C also specifies a virtual machine that is instructed by C program.
This early concept was abandoned, the name sticked.

>clang is slow, buggy and [...] leads to less features and more trouble

Attached: 466.jpg (1024x1820, 125K)

don't care

getting away from GNUshit is its own reward

Nigger George Neville-Neil from FreeBSD said clang compiles binaries in much more sensible way, I don't know what he meant but since he is from FreeBSD project I guess he never miss that apple cock, huh?

GCC has members on the C and C++ ISO Committees. LLVM doesn't. GCC is always one step ahead.

>GCC has members on the C [...] ISO Committees
So does Microsoft.
Doesn't make their compiler any good.
In fact, Microsoft is the reason why we have widechar to begin with, in order to support Window's silly character encoding system.

"She's" cute

Take your gay fetish somwhere else, degenerate. She's female, biological (what a fucking disgusting age that one has to specify this).

Attached: 1544344282633.jpg (525x469, 65K)

That adams apple and jaw are a little off but she could definitely pass

clang is made to enable proprietary software developing companies to restrict the planet even further, do not use or shill it

>'murican anatomy knowledge
that's what a non-obese chick's throat looks like, amerilard
that jaw shows she has top-notch genes for breeding children that will turn into chads, and it makes her that much more attractive
even absolute chinlet would spawn a regular chinned child with her, absolutely 10/10 breeding material
take your gay shit elsewhere

Your projection and self hate is to apparent, amerimutt

LLVM is *not* a virtual machine, it's just a name. You're not turning your C++ code into JVM

>projection
says guy who projects his jewish fetish onto every picture
>self hate
not even close, apart from chinks, we slavs are the only people proud of our culture, despite its flaws
we also didn't fall for the jewish propaganda
>amerimutt
you're pretty bad at guessing, but that's not surprising given you think that pic isn't female
bet you're one of those that still think somik chan is trap

Attached: 5b7661ec39c17.jpg (604x718, 185K)

Imagine being this much of a collectivist

>asan, ubsan, tsan
Doesn't GCC have those too?

Most build systems use the CC environment variable (if it's set) as the compiler for C files, and CXX as the compiler for C++ files.

>clang/llvm
botnet

i'm as much collectivist as i'm individualist
not like an uncultured mutt can comprehend that those two concepts are orthogonal
keep falling for the jewish commie memes, you'll get burned by it just like we did

>fucked up monarchy
>fucked up communism
>fucking up capitalism

>fucked up monarchy
as did every other culture at some point
it had its glory days, it became obsolete, so it ended
slavs were very successful early on though - Bohemia, Poland-Lithuania, Tsardom, were all pretty damn successful in their times despite having shit land, the slavs also stopped Ottoman empire
>fucked up communism
tautology
communism can't be not fucked up
>fucking up capitalism
there are slav countries that have reasonably well-developed capitalism, like V4
most of them fucked up the transition phase and carry the damage to this day
they're arguably still more successful than some of the lazy non-slav cultures in southern yuropoor

Collectivists are literally subhuman trash, they have no redeemable qualities of their own so they're deathly afraid of what individualists represent. Keep talking about how great [insert group you cling to] is, and how bad [insert group you don't belong to] is. That's a really way great to tell everyone that you have no value as a person and no achievements so you need to hold on to the coat-tails of greater men.

>That's a really way great to tell retards* that you have no value as a person and no achievements
being part of group and proud of its achievements doesn't exclude you from having own achievements and acknowledging every individual's achievements, dumb mutt
get anus cancer and die, anarchist idiot (same ad absurdum as you did with collectivism)

damn this board is really pol circlejerk now, nice thread about compilers nerds

>being part of group and proud of its achievements doesn't exclude you from having own achievements and acknowledging every individual's achievements
I'm fine with this if and only if it's a group that you actually *joined*, not some shit that you did nothing to deserve and were just born into. This is the strawman that you present. Im not talking about some engineer being proud of his team for building something, I'm talking about literal 80 iq retards who have nothing to talk about but their race or nationality. See how you instantly screeched about amerifats and how great your country is when my post was completely unrelated.

Clang allows companies to cuck you with a proprietary compiler.

Clang for dev because its tooling and other tooling that uses it is great.
GCC for release builds because the optimizations are usually better and sometimes I want the nonstandard extensions.

You should switch to Tiny C Compiler if you're one of the /minimalism/ anons.

Alot it devolves into a leftypol/pol/troll circle jerk, pay attention to who starts it. ITT a trannie started it with trying to promote transsexuals as acceptable.

hush, i get all my jew-hating memes from Jow Forums
and i already answered OP's shitty license bait in >some shit that you did nothing to deserve and were just born into
so if i *join* a group, i can claim its achievements? fuck off
being proud of your ancestors is *not* taking credit for their achievement, it's an acknowledgement
defending the culture they left behind is also acknowledgment of their achievements
>This is the strawman that you present.
you might want to re-read what strawman is
>Im not talking about some engineer being proud of his team for building something
an engineer can be proud of what his predecessor built, not just what he himself built, and he can shout to the world right after joining the team, without any acomplishment "look at what my predecessor built, now look at the piece of shit our competitors built"
that's not taking credit for something you didn't deserve, except with culture, when you say "we americans" or "we slavs", every person that's not clinically retarded knows you implicitly exclude people without achievement (usually whole generations)
>I'm talking about literal 80 iq retards who have nothing to talk about but their race or nationality
yes, retarded people exist, great observation
>See how you instantly screeched about amerifats [...] when my post was completely unrelated.
it's a great heuristic to use amerilard whenever i see a symptom of jewish propaganda on Jow Forums
when it's a swedish forum, i'd use cuckistani as a heuristic
i fight the jewish propaganda because i don't want other cultures falling for it - just few decades ago, amerimutts and western culture itself was on verge of nuking commies, yet now they're slowly getting infected by it
i was lucky enough to be born during the fall of communism, but i still remember elementary school in communist regime, wouldn't wish that brainwashing on anyone, even the trannies
>how great your country is
not once did i mention my country or how great it is

>being proud of your ancestors is *not* taking credit for their achievement, it's an acknowledgement
defending the culture they left behind is also acknowledgment of their achievements
Based.

yes, llvm makes much better optimizations and has excellent devs from my experience.

now this is bullshit: it is the opposite, sometimes clang takes a bit longer but it can make better optimizations. that's why you see the benchmarks of "rust vs C" being very rarely faster, because at that point you're just seeing llvm vs gcc, not language superiority. there is no good reason to use GCC, so I don't see why you would