Re: [PATCH] c++: ICE with -Wduplicated-branches in template [PR117880]

2024-12-10 Thread Jason Merrill
On 12/9/24 6:28 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? OK. -- >8 -- In a template, for things like void() we'll create a CAST_EXPR with a null operand. That causes a crash with -Wduplicated-branches on: false ? void() : void(); because w

[PATCH] c++: ICE with -Wduplicated-branches in template [PR117880]

2024-12-09 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- In a template, for things like void() we'll create a CAST_EXPR with a null operand. That causes a crash with -Wduplicated-branches on: false ? void() : void(); because we do if (warn_duplicated_branches && (comp