larsbs / id3v2lib

id3v2lib is a library written in C to read and edit id3 tags from mp3 files.
BSD 2-Clause "Simplified" License
128 stars 44 forks source link

Variable Length Arrays not supported by MSVC. #48

Open sizeak opened 1 year ago

sizeak commented 1 year ago

Hi, I'm not sure if it's something you want to support, but you can't currently build this with MSVC (Visual Studio). "I don't plan to support MSVC." is a perfectly reasonable response IMO, so no pressure! I don't usually build for Windows, but the Conan CI builds for it by default, so I've been testing with VS 2019.

It seems that they don't support VLAs since they were made optional in C11, and have no plans to ever support them: https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-support-arriving-in-msvc/#variable-length-arrays

I suppose to support MSVC the VLAs would need replacing with good old malloc. WDYT?

larsbs commented 1 year ago

@simoncent If the only change we have to do is replacing the VLAs, I don't mind. However, currently I don't have the time to doing so (and I don't remember exactly where I could've used them, since I tend to prefer "good ol' malloc".