Skip to content

Commit

Permalink
Ignore GCC13 new warning for flex array inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Feb 6, 2024
1 parent ee5a2f5 commit a314a2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/iovector.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ inline void delete_iovector(iovector* ptr);

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#if __GNUC_MINOR__ >= 13
#pragma GCC diagnostic ignored "-Wzero-length-bounds"
#pragma GCC diagnostic ignored "-Wstrict-flex-arrays"
#endif

class iovector
{
Expand Down Expand Up @@ -861,7 +865,7 @@ class iovector

struct IOVAllocation_ : public IOAlloc
{
void* bases[0];
void* bases[];
void* do_allocate(int size, uint16_t& nbases, uint16_t capacity)
{
return do_allocate(size, size, nbases, capacity);
Expand Down

0 comments on commit a314a2a

Please sign in to comment.