Re: Is it really such a good thing for newNode() to be a macro?

From: "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is it really such a good thing for newNode() to be a macro?
Date: 2008-08-30 10:02:40
Message-ID: 20080830100240.GA27541@cuci.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-30 15:51:49 Re: Is it really such a good thing for newNode() to be a macro?
Previous Message Tom Lane 2008-08-30 02:53:18 Re: Is it really such a good thing for newNode() to be a macro?