Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
No, definitely don't do this, and this is the third low-effort "meme" posted here in the last hour alone.
-
neel-basu304y@junon I think that's why it's in the jokes section.
Anyways don't do `sudo clang` either. -
kamen69254yPardon my ignorance, but what would running a compiler as su fuck up? Normally it shouldn't touch anything outside the project you're trying to compile, right?
-
neel-basu304y@kamen nothing much. It will create the binaries under root privilege. So the executables or the shared objects will be owned by root instead. The machine won't blow up.
But if the code is wrong then it won't compile with su either. It's just a joke. -
Yeah i find it kinda funny, too 😅
Btw weakly typed languages are running their compilation with sudo by default ;) -
neel-basu304y@Lensflare In weakly typed languages writing the code is not satisfactory. It has to be executed and the modified part has to be tested. Then all the tests must pass.
In C++ many times just compiling is satisfying because many of the decisions are taken at compile time only. If it compiles fine then it has a high probability of working fine. However all tests must pass. -
hjk10156964y@kamen on it's own not much. If you do it in a production system you might circumvent user imposed limits and therefore high the resources and burying it down.
When there are makefiles in the mix the are a few dangerous or unexpected situations that can occur. Especially when the suid but it's set without forcing a specific user. The compiled result will run as root always.
Tools sometimes behave differently as root and can have different output like outputting as message"don't run as root" this might interfere with the Make Magic
If your code doesn't compile, use `sudo gcc`
:D
joke/meme
c++ gcc linux