Content-Length: 263508 | pFad | http://github.com/postgrespro/postgres/commit/b46d9beb658af7eb4e2a08dfa34206a117c9654f

B1 With ancient gcc, skip pg_attribute_printf() on function pointer. · postgrespro/postgres@b46d9be · GitHub
Skip to content

Commit b46d9be

Browse files
committed
With ancient gcc, skip pg_attribute_printf() on function pointer.
Buildfarm results show that the ability to attach pg_attribute_printf decoration to a function pointer appeared somewhere between gcc 2.95.3 and gcc 4.0.1. Guess that it was there in 4.0.
1 parent 9a83564 commit b46d9be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/psql/psqlscan.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ typedef struct PsqlScanCallbacks
3232
/* This pointer can be NULL if no variable substitution is wanted */
3333
char *(*get_variable) (const char *varname, bool escape, bool as_ident);
3434
/* Print an error message someplace appropriate */
35+
/* (very old gcc versions don't support attributes on function pointers) */
36+
#if defined(__GNUC__) && __GNUC__ < 4
37+
void (*write_error) (const char *fmt,...);
38+
#else
3539
void (*write_error) (const char *fmt,...) pg_attribute_printf(1, 2);
40+
#endif
3641
} PsqlScanCallbacks;
3742

3843

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/b46d9beb658af7eb4e2a08dfa34206a117c9654f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy