The following code should raise a diagnostic with -std=c99 -pedantic-errors
int **p; void foo (int b[restrict 2]) { p = &b; } -- Summary: Failure to appropriately qualify C99 pointer decayed from array parameter Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: neil at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29237