This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: format-truncation warning with -O2 on gcc 7.1.1


On Thu, Jun 22, 2017 at 4:51 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 22 June 2017 at 15:31, Jonathan Wakely wrote:
>> Because the -Wformat-overflow warnings are new in GCC 7, i.e. GCC got
>> better. See https://gcc.gnu.org/gcc-7/changes.html#c-family
>
> Oops, I meant -Wformat-truncation not -Wformat-overflow. I copy&pasted
> the wrong option.

I didn't even notice :-|

I forgot to follow up on the comment in the code.
Any idea why commenting out the "  if ( amt == 0 ) return " makes the
warning go away?
I can't think of a reason.

Pico


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]