Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
what is best in optimizer pipeline
value numbering
code motion
peepholing
loop idiom recognition
legalization
thread gassing
op banning
View Results
 
  • Locked thread
Jabor
Jul 16, 2010

#1 Loser at SpaceChem

redleader posted:

good thread op

why can't c/c++ compilers emit warnings when they encounter undefined behaviour? is it just that it's too hard to fit into current compiler architecture? would it be a useless thing to include because every program would be filled with undefined behavior?

They can in many cases. But there are some categories of undefined behavior where the compiler just doesn't know if a particular construction is going to be undefined behavior in practice, and it's not reasonable to emit a warning in cases that may or may not be undefined behavior.

For example, it would not be useful if the compiler threw a "potentially undefined behavior" warning any time you did arithmetic on a signed value.

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

MALE SHOEGAZE posted:

yeah it seems like you shouldn't be able to unlink /dev/null without root access.

you can't.

that purpose of that change seems to be about making it possible to run the build script as root. not sure why that's a desirable thing to support.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
<T extends HotMess<OfShit>> void doStuff() {
T thing = getThing()
}


You might need to have a parameter or something that actually uses that type, idk. And you're really just punting the problem up to whatever calls this method.

  • Locked thread