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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy