-----Original Message-----
From: <owner-src-committ...@freebsd.org> on behalf of Benjamin Kaduk 
<bjkf...@gmail.com>
Date: 2018-06-06, Wednesday at 07:40
To: Ravi Pokala <rpok...@freebsd.org>
Cc: Mateusz Guzik <m...@freebsd.org>, src-committers 
<src-committ...@freebsd.org>, <svn-src-...@freebsd.org>, 
<svn-src-head@freebsd.org>
Subject: Re: svn commit: r334702 - head/sys/sys

> On Wed, Jun 6, 2018 at 6:35 AM, Ravi Pokala <rpok...@freebsd.org> wrote:
>> 
>> Hi Mateusz,
>> 
>> -----Original Message-----
>> From: <owner-src-committ...@freebsd.org> on behalf of Mateusz Guzik 
>> <m...@freebsd.org>
>> Date: 2018-06-06, Wednesday at 01:08
>> To: <src-committ...@freebsd.org>, <svn-src-...@freebsd.org>, 
>> <svn-src-head@freebsd.org>
>> Subject: svn commit: r334702 - head/sys/sys
>> 
>>> ...
>>>  #ifdef _KERNEL
>>>  #define      malloc(size, type, flags) ({                                  
>>>   \
>> 
>> Now that I'm taking another look at this, I'm confused as to why the entire 
>> macro expansion is inside parentheses? (The braces make sense, since this is 
>> a block with local variables which need to be contained.)
> 
> This is a gcc (and clang) extension to allow the macro body to be a code 
> block -- standard C gets unhappy with just the curly braces.  
> https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html is a maybe-relevant 
> page that google found me.

"Neat." Thanks Ben.

-Ravi

> -Ben 





_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to