[RFC] Warnings for cases where int promotion is unexpected and may cause bugs

2022-06-16 Thread Aniruddh Agarwal
Hello, A colleague patched a prod-critical bug today caused by an overlooked implicit int promotion when adding uint8_t's. g++ (v12.1) doesn't report any warnings for it with all combinations of warnings flags that I've tried, so I thought I'd ask if: - there *is* already some combination of

Re: [RFC] Warnings for cases where int promotion is unexpected and may cause bugs

2022-06-16 Thread Aniruddh Agarwal
Apologies, I didn't realize that my mail client doesn't auto-wrap. Please find a wrapped copy of my original message below my signature. -Ani On Thu, Jun 16, 2022, at 9:11 PM, Aniruddh Agarwal wrote: > Hello, > > A colleague patched a prod-critical bug today caused by an ove