Currently there's a setting for "Allow overselling of stock" if you set this to no then you cannot add items if they are out of stock.
There are times where I still want to add the item if it's out of stock but still want to be warned so I can make a decision on adding that item or an alternative. It'd be useful to have an option for a popup that warns me if the item is out of stock and asks me if I want to continue.