Skip to content

mixed pointer/array declared types don't seem to work #12

@pgbovine

Description

@pgbovine

(NB: is this just because i'm using C11 and not a newer dialect?)

examples:

int main(void) {
  char (*arr)[8]=malloc(3*8);
  arr[2][5]=75;
  return 0;
}
---
int main(void) {
  char (*arr)[3][8] = malloc(24*8);
  for (int i=0;i<3;i++){
    for (int a=0;i<8;a++){
      strcpy(arr[i][a],"CST8323");
    }
  }
  return 0;
}
---
int main() {
  int (*data)[3] = malloc(4 * 3 * sizeof(int));
  return 0;
}
---
int main() {
  int (*a)[4];
  a = malloc(sizeof(int)*4);
  return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions