Menu

#100 CALL in constant

Bug
closed-duplicate
nobody
5
2009-04-20
2008-10-27
Jon Rafkind
No

Cil 1.3.6 cannot parse the following expression. It appears in linux-2.6.22.4/fs/char_dev.c in __register_chrdev_region on line 111.

for (i = (sizeof(chrdevs) / sizeof((chrdevs)[0]) + (sizeof(char[1 - 2 * !!(__builtin_types_compatible_p(typeof(chrdevs), typeof(&chrdevs[0])))]) - 1))-1; i > 0; i--) {
if (chrdevs[i] == ((void *)0))
break;
}

Original code was

for (i = ARRAY_SIZE(chrdevs)-1; i > 0; i--) {
if (chrdevs[i] == NULL)
break;
}

Discussion

  • David Gay

    David Gay - 2009-04-20

    See #1852730

     
  • David Gay

    David Gay - 2009-04-20
    • milestone: --> Bug
    • status: open --> closed-duplicate
     

Log in to post a comment.