https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97932

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|                            |2020-11-21

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed,
Min example:
#define container_of( P, T, M )  ( (void)((P) - &((T*)0)->M), (T*)((char*)(P) -
(int)&((T*)0)->M) )
typedef struct {
    short a;
    short b;
} test_t;

int main( int argc, const char *argv[] )
{
    short c;
    char b;
    tptr = container_of( b, test_t, b );
    return  0;
}

---- CUT ----
For some reason the preprocessor or the C front-end thinks the range goes all
the way to the closing ) on the container_of line.

Reply via email to