[PATCH] disable -Walloc-size-larger-than and -Wstringop-overflow for non-C front ends (PR 80545)

Jeff Law law@redhat.com
Fri May 5 04:21:00 GMT 2017


On 04/28/2017 04:02 PM, Martin Sebor wrote:
> The two options were included in -Wall and enabled for all front
> ends but only made to be recognized by the driver for the C family
> of compilers.  That made it impossible to suppress those warnings
> when compiling code for those other front ends (like Fortran).
> 
> The attached patch adjusts the warnings so that they are only
> enabled for the C family of front ends and not for any others,
> as per Richard's suggestion.  (The other solution would have
> been to make the warnings available to all front ends.  Since
> non-C languages don't have a way of calling the affected
> functions -- or do they? -- this is probably not necessary.)
> 
> Martin
> 
> gcc-80545.diff
> 
> 
> PR driver/80545 - option -Wstringop-overflow not recognized by Fortran
> 
> gcc/c-family/ChangeLog:
> 
> 	PR driver/80545
> 	* c.opt (-Walloc-size-larger-than, -Wstringop-overflow): Enable
> 	and make available for the C family only.
OK.
jeff



More information about the Gcc-patches mailing list