[...]/source-gcc/gcc/config/nvptx/nvptx.cc:2485:1: error: ‘bool flexible_array_member_type_p(const_tree)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
2485 | flexible_array_member_type_p (const_tree type)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from [...]/source-gcc/gcc/config/nvptx/nvptx.cc:30:
[...]/source-gcc/gcc/tree.h:7022:13: note: previous declaration of ‘bool flexible_array_member_type_p(const_tree)’
7022 | extern bool flexible_array_member_type_p (const_tree);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
That's due to recent commit
ed1d15e94f5ce28a9fdba6e3b255efef420c93f0
"c: harmonize checking for flex array member type".
gcc/
* config/nvptx/nvptx.cc (flexible_array_member_type_p): Rename to
'nvptx_flexible_array_member_type_p'.
given dimension. */
static bool
-flexible_array_member_type_p (const_tree type)
+nvptx_flexible_array_member_type_p (const_tree type)
{
if (TREE_CODE (type) != RECORD_TYPE)
return false;
bool atype = (TREE_CODE (type) == ARRAY_TYPE)
&& (TYPE_DOMAIN (type) == NULL_TREE);
- if (undefined && flexible_array_member_type_p (type))
+ if (undefined && nvptx_flexible_array_member_type_p (type))
{
size = 0;
atype = true;