Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Tom Lane
... btw, why don't we convert c.h's Max(), Min(), and Abs() to inlines? They've all got multi-eval hazards. It might also be interesting to research whether inline would allow simplifying the MemSetFoo family. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Andres Freund
On 2015-08-12 10:18:12 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: On 2015-07-01 12:55:48 -0300, Alvaro Herrera wrote: Tom Lane wrote: I'm thinking we really ought to mount a campaign to replace some of these macros with inlined-if-possible functions. My guess is

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-08-12 10:18:12 -0400, Tom Lane wrote: Sounds reasonable to me. If you do this, I'll see whether pademelon can be adjusted to build using the minimum macro expansion buffer size specified by the C standard. Here's the patch attached. Looks

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Andres Freund
On 2015-07-01 12:55:48 -0300, Alvaro Herrera wrote: Tom Lane wrote: Last night my ancient HP compiler spit up on HEAD: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=pademelondt=2015-07-01%2001%3A30%3A18 complaining thus: cpp: brin_pageops.c, line 626: error 4018: Macro param too

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-07-01 12:55:48 -0300, Alvaro Herrera wrote: Tom Lane wrote: I'm thinking we really ought to mount a campaign to replace some of these macros with inlined-if-possible functions. My guess is that changing a very small amount of them will do a

Re: [HACKERS] Macro nesting hell

2015-07-01 Thread Alvaro Herrera
Tom Lane wrote: Last night my ancient HP compiler spit up on HEAD: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=pademelondt=2015-07-01%2001%3A30%3A18 complaining thus: cpp: brin_pageops.c, line 626: error 4018: Macro param too large after substitution - use -H option. I was able

[HACKERS] Macro nesting hell

2015-07-01 Thread Tom Lane
Last night my ancient HP compiler spit up on HEAD: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=pademelondt=2015-07-01%2001%3A30%3A18 complaining thus: cpp: brin_pageops.c, line 626: error 4018: Macro param too large after substitution - use -H option. I was able to revive pademelon by