On Tue, Dec 13, 2016 at 10:25 AM, Peter Bortas @ Pike developers forum 10353@lyskom.lysator.liu.se wrote:
I don't know the details, grubba is the one that has been trying to get 8.1 to build on the existing VC9 Windows build machines. So anything that doesn't break VC9 is probably fine.
I'm having trouble finding authoritative information on what VC9 supports (MS don't seem to carry much information on their older compilers - they carry precious little even on the current ones - so I'm depending on Stack Overflow), but it looks like VLAs are *not* supported. Sigh. So I guess I'll change it up. Should I go with alloca, or does Pike have its own preferred way to do this?
ChrisA
I'd be OK with disabling GTK on Windows in 8.1 for now if the alternative is uglifying your entire codebase. Grubba might need it for something though, so don't commit anything to that effect until he gives the go ahead.
On 12/13/16 00:33, Chris Angelico wrote:
I'm having trouble finding authoritative information on what VC9 supports (MS don't seem to carry much information on their older compilers - they carry precious little even on the current ones - so I'm depending on Stack Overflow), but it looks like VLAs are *not* supported. Sigh. So I guess I'll change it up. Should I go with alloca, or does Pike have its own preferred way to do this?
I know that alloca does not play well with longjmp. This is not a problem on all compilers, but specifically windows builds can break when using both in the same function. I suppose that C99 arrays are ok once they are correctly supported. I removed alloca from sprintf for instance some years ago because it could crash on windows. Use heap memory if you can.
arne
On Tue, Dec 13, 2016 at 9:58 PM, Arne Goedeke el@laramies.com wrote:
On 12/13/16 00:33, Chris Angelico wrote:
I'm having trouble finding authoritative information on what VC9 supports (MS don't seem to carry much information on their older compilers - they carry precious little even on the current ones - so I'm depending on Stack Overflow), but it looks like VLAs are *not* supported. Sigh. So I guess I'll change it up. Should I go with alloca, or does Pike have its own preferred way to do this?
I know that alloca does not play well with longjmp. This is not a problem on all compilers, but specifically windows builds can break when using both in the same function. I suppose that C99 arrays are ok once they are correctly supported. I removed alloca from sprintf for instance some years ago because it could crash on windows. Use heap memory if you can.
*facepalm* Windows builds can break on anything. Okay. You know what? I have another solution. It's not like you're often going to need very many targets. Until C99 is supported, these now use a fixed-size buffer, and check the array length. So instead of risking a crash, they just limit you to ten in the incoming array.
ChrisA
pike-devel@lists.lysator.liu.se