News for hackers. Stuff that matters.
Re:Checked C by LegionMammal978 on Wednesday December 21, 2022 @08:15PM (#34088519)
That does not change the interface of the function. Function type compatibility looks at the adjusted parameter types, so the parameter is always treated as a simple pointer. Therefore, all of these declarations could be used to refer to the function:

  static void qux(int n, int *a);
  static void qux(int n, int a[]);
  static void qux(int n, int a[*]);
  static void qux(int n, int a[n]);
  static void qux(int n, int a[12345]);
Weird interface problems mainly come when you have VLA types behind pointers.

There are no comments on this comment yet.