aboutsummaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/c.h b/src/include/c.h
index a904b49a37f..f242e32edbe 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -266,6 +266,13 @@
#endif
/*
+ * Generic function pointer. This can be used in the rare cases where it's
+ * necessary to cast a function pointer to a seemingly incompatible function
+ * pointer type while avoiding gcc's -Wcast-function-type warnings.
+ */
+typedef void (*pg_funcptr_t) (void);
+
+/*
* We require C99, hence the compiler should understand flexible array
* members. However, for documentation purposes we still consider it to be
* project style to write "field[FLEXIBLE_ARRAY_MEMBER]" not just "field[]".