int
returns_int_pointer_with_ignored_size(int a[3])
{
return a[0];
}
int
/* expect+1: error: static array size requires C11 or later [343] */
returns_int_array(int a[static 3])
{
return a[0];
}
int
/* expect+1: error: syntax error '3' [249] */
returns_volatile_int_array(int a[volatile 3])
{
/* expect+2: error: cannot dereference non-pointer type 'int' [96] */
/* expect+1: error: function 'returns_volatile_int_array' expects to return value [214] */
return a[0];
}
/*
* This triggers the "Bad attribute", but for some reason, that custom error
* message does not make it into the actual diagnostic.
*/
/* expect+2: error: syntax error ']' [249] */
/* expect+1: error: static array size requires C11 or later [343] */
void invalid_storage_class(int a[const typedef 3]);