On 07/21/2015 04:56 AM, Marek Polacek wrote:
Ping.
On Tue, Jul 14, 2015 at 06:38:12PM +0200, Marek Polacek wrote:
Ok, in that case I think easiest would the following (I hit the same issue
when writing the -Wtautological-compare patch):
Bootstrapped/regtested on x86_64-linux, ok for trunk?
20
Ping.
On Tue, Jul 14, 2015 at 06:38:12PM +0200, Marek Polacek wrote:
> Ok, in that case I think easiest would the following (I hit the same issue
> when writing the -Wtautological-compare patch):
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> 2015-07-14 Marek Polacek
>
>
On 07/14/2015 07:38 PM, Marek Polacek wrote:
> Ok, in that case I think easiest would the following (I hit the same issue
> when writing the -Wtautological-compare patch):
Thanks for taking care of this issue.
--
Regards,
Mikhail Maltsev
Sorry it's taken so long to respond.
On Wed, Jun 24, 2015 at 05:43:05PM +0300, Mikhail Maltsev wrote:
> > That looks wrong, because with TREE_CONSTANT we'd warn in C but not in C++
> > for the following:
> >
> > const int a = 4;
> > void
> > f (void)
> > {
> > const int b = 4;
> > static cons
On 23.06.2015 22:49, Marek Polacek wrote:
> On Sat, Jun 20, 2015 at 03:02:06AM +0300, Mikhail Maltsev wrote:
>> - /* We do not warn for constants because they are typical of macro
>> - expansions that test for features. */
>> - if (CONSTANT_CLASS_P (op_left) || CONSTANT_CLASS_P (op_right))
>
On Sat, Jun 20, 2015 at 03:02:06AM +0300, Mikhail Maltsev wrote:
> - /* We do not warn for constants because they are typical of macro
> - expansions that test for features. */
> - if (CONSTANT_CLASS_P (op_left) || CONSTANT_CLASS_P (op_right))
> + /* We do not warn for literal constants bec
Hi.
In current implementation we avoid giving "logical and/or of equal
expressions" warning for literal constant operands. The attached patch
fixes the check to make it treat const-qualified VAR_DECLs with constant
initializers the same way.
Bootstrapped and regtested on x86_64-linux. OK for trunk