This is the mail archive of the gcc-patches@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: [PATCH v2] Add sanopt support for UBSAN_PTR.


On Fri, Oct 06, 2017 at 01:43:20PM +0200, Martin Liška wrote:
> Thanks for feedback, all resolved except this one:
> 
> ../../gcc/sanopt.c:561:3: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
>    ; /* Don't record base_addr + expr_offset, it's not a guarding
>    ^

Ah, indeed (unlike for if (...) /* comment */; ).
So perhaps do if (!cond) /* comment */; else { ... }
instead of if (cond) { ... } else /* comment */; ?
Or put the else stuff into the comment.
I certainly can't find a single occurence of the else {} idiom
in gcc/*.[ch].
But with the multi-line {} I guess I can live with it too.

So, if it passes bootstrap/regtest, ok for trunk, with or without
the above suggested change.

	Jakub


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