On 10/20/16 10:05, Markus Trippelsdorf wrote:
>
> Thanks for the commit. But I think the comment is wrong:
>
> +      /* We will only warn on unsigned shifts here, because the majority of
>                                ^^
> This should be »signed«.
>

Oops.  Thanks for noticing.

This is what I am going to check in as obvious:

--- ChangeLog   (revision 241376)
+++ ChangeLog   (working copy)
@@ -1,3 +1,7 @@
+2016-10-20  Bernd Edlinger  <bernd.edlin...@hotmail.de>
+
+       * c-common.c (c_common_truthvalue_conversion): Fix the comment.
+
  2016-10-20  Jason Merrill  <ja...@redhat.com>

        * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
Index: c-common.c
===================================================================
--- c-common.c  (revision 241376)
+++ c-common.c  (working copy)
@@ -3328,7 +3328,7 @@
                                               TREE_OPERAND (expr, 0));

      case LSHIFT_EXPR:
-      /* We will only warn on unsigned shifts here, because the majority of
+      /* We will only warn on signed shifts here, because the majority of
         false positive warnings happen in code where unsigned arithmetic
         was used in anticipation of a possible overflow.
         Furthermore, if we see an unsigned type here we know that the
         result of the shift is not subject to integer promotion rules.  */


Bernd

Reply via email to