Re: [14.x PATCH] c: Allow bool and enum null pointer constants [PR112556]

2025-05-14 Thread Sam James
Joseph Myers writes: > On Wed, 14 May 2025, Sam James wrote: > >> > (cherry picked from commit 3d525fce70fa0ffa0b22af6e213643e1ceca5ab5) >> > --- >> > As discussed on the PR, I feel like this is worth having for 14 as we're >> > asking upstreams to try reproduce issues w/ -std=gnu23 (or -std=c23)

Re: [14.x PATCH] c: Allow bool and enum null pointer constants [PR112556]

2025-05-14 Thread Joseph Myers
On Wed, 14 May 2025, Sam James wrote: > > (cherry picked from commit 3d525fce70fa0ffa0b22af6e213643e1ceca5ab5) > > --- > > As discussed on the PR, I feel like this is worth having for 14 as we're > > asking upstreams to try reproduce issues w/ -std=gnu23 (or -std=c23) if > > they don't have access

Re: [14.x PATCH] c: Allow bool and enum null pointer constants [PR112556]

2025-05-14 Thread Sam James
Sam James writes: > From: Joseph Myers > > As reported in bug 112556, GCC wrongly rejects conversion of null > pointer constants with bool or enum type to pointers in > convert_for_assignment (assignment, initialization, argument passing, > return). Fix the code there to allow BOOLEAN_TYPE and

[14.x PATCH] c: Allow bool and enum null pointer constants [PR112556]

2025-05-08 Thread Sam James
From: Joseph Myers As reported in bug 112556, GCC wrongly rejects conversion of null pointer constants with bool or enum type to pointers in convert_for_assignment (assignment, initialization, argument passing, return). Fix the code there to allow BOOLEAN_TYPE and ENUMERAL_TYPE; it already allow