Microchip will not be reading you Post about the Forum.
.DOC? .TXT is safer.
Yeah, that's always the risk, though Microchip has responded in the past (and here too!). A plain text document would probably be better, but I did want the formatting since I was trying to post code. I thought this forum used to allow PDFs, but really the solution should be fixing the forum. It's quite ridiculous that you can't post code on a forum where'd you get help with code.
Thank you for bringing this up.
Yes, that flexible array header structure is in the middle of the IPV6_PACKET structure.
Obvious choice would be to move it at the end - I don't think that the code overrides that data member but I need to check.
I'll create an internal issue to take care of this.
Interestingly enough, neither xc32 nor IAR compiler didn't signal this error for our projects builds.
I think I posted a Compiler Explorer link in the document. If you change the "-x c++" option in the middle pane where you can select a compiler to instead say "-x c", then you'll see the error go away. It would seem that C doesn't care, but C++ does, which is probably why you haven't seen it. Also, like I stated in the doc, XC32 doesn't show a full message anyway, so it'd be easy to miss and confusing. I don't think flexible array members are actually supported by C++ but are a compiler extension, so maybe that's why. The previous version of the stack we had declared the array as having zero length, which I think suppressed the message.
I can easily move the offending member to the end of the struct, but I didn't yet just because I wasn't sure if you were using some clever tricks to use the FLA to fill in the two remaining members (the TCPIP_NET_HANDLE and the IPV6_HEADER members) via a memcpy or something like that.