Menu

#3254 int * doesn't match int *

closed-fixed
None
Front-end
5
2022-04-21
2021-06-15
No

The following code fails to compile:

int i;

void f(void)
{
    i = _Generic(&i, int * : 1, long * : 2);
}

Apparently, SDCC treats &i as __near int * and does not match it wiht int *.

Related

Feature Requests: #749
Patches: #392
Wiki: SDCC-STD-UX

Discussion

  • Benedikt Freisen

    This looks like it could be closely related to the part of [bugs:#3145] where implicit address spaces interfere with _Generic.

     

    Related

    Bugs: #3145

  • Philipp Klaus Krause

    In the implicitintrinsicnamedaddressspaces branch, there is an experimental fix in [r13393].

     

    Related

    Commit: [r13393]


    Last edit: Philipp Klaus Krause 2022-04-20
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    As of [r13402], the fix is in trunk.

     

    Related

    Commit: [r13402]


Log in to post a comment.

MongoDB Logo MongoDB