Andres Freund <andres@anarazel.de> writes:
>> I personally find per-function annotation ala
>> __attribute__((optimize("no-crossjumping")))
>> cleaner anyway. I tested that, and it seems to work.
>>
>> Obviously we'd have to hide that behind a configure test. Could also do
>> tests based on __GNUC__ / __GNUC_MINOR__, but that seems uglier.
Agreed.
> Checking for this isn't entirely pretty - see my attached attempt at
> doing so. I considered hiding
> __attribute__((optimize("no-crossjumping"))) in execInterpExpr.c behind
> a macro (like PG_DISABLE_CROSSJUMPING), but I don't really think that
> makes things better.
I think it would, primarily because if we find out that some other compiler
spells this differently, we could handle it totally within configure.
Isn't our practice to put __attribute__ at the end of a function
declaration or definition, not in the middle someplace?
regards, tom lane