[PATCH] libsanitizer: remove -pedantic option

Martin Liška mliska@suse.cz
Fri Nov 5 16:02:13 GMT 2021


On 11/5/21 16:29, Jakub Jelinek wrote:
> On Fri, Nov 05, 2021 at 04:25:53PM +0100, Martin Liška wrote:
>> On 11/5/21 16:22, H.J. Lu wrote:
>>> Should we add __extension__ here?
>>
>> I tried doing that but it didn't help me with the warning.
>> Maybe I did something wrong?
> 
> Works for me just fine say on:
> void foo ()
> {
>    int a = ({ int d = 1; d; });
>    int b = __extension__ ({ int d = 1; d; });
> }
> -Wpedantic warning on line 3, none on line 4.  Add -D__extension__=
> and it warns on both.
> 
> 	Jakub
> 

Thank you both, it really work. I wrongly put the keyword to the first
statement in curly braces.

I'm going to suggest that to the upstream.

Cheers,
Martin


More information about the Gcc-patches mailing list