This will vary with each airline, but they can charge you an excess baggage fee or force you to check in your carry-on. Many airlines, especially large carriers, do not measure the size of the carry-on. You’ll be surprised the amount of oversized carry-on luggage passengers bring on board.