Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Tom Lane
Andres Freund 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 like you need

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Andres Freund
On 2015-08-12 10:18:12 -0400, Tom Lane wrote: > Andres Freund 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 th

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 (pg

Re: [HACKERS] Macro nesting hell

2015-08-12 Thread Tom Lane
Andres Freund 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 large >> e

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=pademelon&dt=2015-07-01%2001%3A30%3A18 > > complaining thus: > > cpp: "brin_pageops.c", line 626: error 4018: Macro

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=pademelon&dt=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 wa

[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=pademelon&dt=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 b