Re: Nonstandard GCC features

2008-11-22 Thread Nick Sabalausky
Michel Fortin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 2008-11-21 07:43:47 -0500, bearophile [EMAIL PROTECTED] said: Just found this cute article on Reddit: GCC hacks in the Linux kernel, by M. Tim Jones:

Nonstandard GCC features

2008-11-21 Thread bearophile
Just found this cute article on Reddit: GCC hacks in the Linux kernel, by M. Tim Jones: http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/index.html Here are few comparisons between those featuers are D ones. The range syntax that can be used in switch statements and array defintions

Re: Nonstandard GCC features

2008-11-21 Thread Michel Fortin
On 2008-11-21 07:43:47 -0500, bearophile [EMAIL PROTECTED] said: Just found this cute article on Reddit: GCC hacks in the Linux kernel, by M. Tim Jones: http://www.ibm.com/developerworks/linux/library/l-gcc-hacks/index.html Here are few comparisons between those featuers are D ones. The

Re: Nonstandard GCC features

2008-11-21 Thread bearophile
Michel Fortin: Just use data.ptr if you want to escape the bound checks. Ah, thank you. Do we need that when we have exceptions in D? You are right. But maybe people that write a kernel may prefer to check error return values instead of using exceptions. Note this article was about GCC used

Re: Nonstandard GCC features

2008-11-21 Thread Kagamin
bearophile Wrote: Zero-length arrays are available in D, but the following code (used in C to define a struct with ane or two variable-length arrays) can't be used, because of array bound controls: struct iso_block_store { atomic_t refcount; size_t data_size;