Re: Is it really such a good thing for newNode() to be a macro? - Mailing list pgsql-hackers

From Stephen R. van den Berg
Subject Re: Is it really such a good thing for newNode() to be a macro?
Date
Msg-id 20080830100240.GA27541@cuci.nl
Whole thread Raw
In response to Re: Is it really such a good thing for newNode() to be a macro?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is it really such a good thing for newNode() to be a macro?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
>Accordingly, I'm going to go ahead with this:

>#ifdef __GNUC__

>/* With GCC, we can use a compound statement within an expression */
>#define newNode(size, tag) \
>({    Node   *__result__; \

Please avoid identifiers starting with __ .
ANSI reserves those for the implementation (the compiler and lib).
Either use the old global name or something like newMode_result.
-- 
Sincerely,          Stephen R. van den Berg.
Several ways to kill a programmer:  kill -15, fair trial; kill -1, death by
hanging; kill -2, suicide; kill -3, euthanasia; kill -9, execution.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is it really such a good thing for newNode() to be a macro?
Next
From: Tom Lane
Date:
Subject: Re: Is it really such a good thing for newNode() to be a macro?