Re: Variable Length Arrays

2015-01-03 Thread Ted Bullock
The 2015-01-02, Theo de Raadt wrote: So what do you guys think? VLA's, are they good, bad, evil, stupid, all of the above? alloca() re-invented. alloca(3) was considered slightly unsafe, because use if it was rare. Your mail strikes so widely, feel free to modify a whole system to use

Re: Variable Length Arrays

2015-01-03 Thread Miod Vallat
So I've been wondering about variable length arrays from c99 for a while now. They seem to me like a good way to avoid lots of trivial calls to malloc/free at least for smaller arrays that aren't going to blow up the stack. That said I don't see them being used. The promise of them seems

Re: Variable Length Arrays

2015-01-03 Thread Ted Unangst
On Thu, Jan 01, 2015 at 20:12, Ted Bullock wrote: Hey Folks, So I've been wondering about variable length arrays from c99 for a while now. They seem to me like a good way to avoid lots of trivial calls to malloc/free at least for smaller arrays that aren't going to blow up the stack

Re: Variable Length Arrays

2015-01-02 Thread Theo de Raadt
So I've been wondering about variable length arrays from c99 for a while now. They seem to me like a good way to avoid lots of trivial calls to malloc/free at least for smaller arrays that aren't going to blow up the stack. That said I don't see them being used. The promise of them seems

Variable Length Arrays

2015-01-02 Thread Ted Bullock
Hey Folks, So I've been wondering about variable length arrays from c99 for a while now. They seem to me like a good way to avoid lots of trivial calls to malloc/free at least for smaller arrays that aren't going to blow up the stack. That said I don't see them being used. The promise of them

Re: gcc and variable length arrays

2006-10-11 Thread Mark Bucciarelli
On Tue, Oct 10, 2006 at 02:42:12PM -0700, Joe wrote: By the way, if anyone has any pointers (no pun intended) for a CS newbie, any help and recommendations are always appeciated. I like the OpenBSD development community and hope to contribute some code and patches in the future. Advanced

Re: gcc and variable length arrays

2006-10-10 Thread Ted Unangst
On 10/9/06, Joe [EMAIL PROTECTED] wrote: I'm trying to find a compiler that supports variable length arrays. I'm currently taking a computer science class and noticed that gcc's support for variable lenght arrays is broken [0]. i think you'll be hard pressed to come up with an example

Re: gcc and variable length arrays

2006-10-10 Thread Joe
Ted Unangst wrote: On 10/9/06, Joe [EMAIL PROTECTED] wrote: I'm trying to find a compiler that supports variable length arrays. I'm currently taking a computer science class and noticed that gcc's support for variable lenght arrays is broken [0]. i think you'll be hard pressed to come up

Re: gcc and variable length arrays

2006-10-10 Thread Sam Chill
On 10/10/06, Joe [EMAIL PROTECTED] wrote: By the way, if anyone has any pointers (no pun intended) for a CS newbie, any help and recommendations are always appeciated. I like the OpenBSD development community and hope to contribute some code and patches in the future. Read the source tree. No

Re: gcc and variable length arrays

2006-10-10 Thread Michael Small
that it is mostly compliant with a few issues, including the variable length arrays which happens to be on one of my homework assignments. But it looks like I'll be ok. Aside from the compiler, you need to consider the C library if you have to have full C99 compliance for some reason. It doesn't

gcc and variable length arrays

2006-10-09 Thread Joe
I'm trying to find a compiler that supports variable length arrays. I'm currently taking a computer science class and noticed that gcc's support for variable lenght arrays is broken [0]. Is there another compiler I can use that ships with OpenBSD? (I use vi and gcc on OpenBSD for my class

Re: gcc and variable length arrays

2006-10-09 Thread Andrew Pinski
On Mon, 2006-10-09 at 22:07 -0700, Joe wrote: I'm trying to find a compiler that supports variable length arrays. I'm currently taking a computer science class and noticed that gcc's support for variable lenght arrays is broken [0]. The reason why it is broken is not the reason why you think