On Mon, Nov 7, 2016 at 2:34 PM, Vicky Vergara <vicky_verg...@hotmail.com> wrote:
> Hello, > > Posting an update to this issue (which by the way also shows up on 9.6) > > Maybe this information is useful for extension developers (that have all > the warnings flags on while developing using GNUC) > > > By wrapping the files as follows, any warnings generated by the postgres's > header files are ignored. > > > #ifdef __GNUC__ > #pragma GCC diagnostic ignored "-pedantic" > #endif > > #include "postgres.h" > > #ifdef __GNUC__ > #pragma GCC diagnostic pop > #endif > > > #ifdef __GNUC__ > #pragma GCC diagnostic ignored "-Wsign-conversion" > #pragma GCC diagnostic ignored "-Wunused-parameter" > #endif > > #include "executor/spi.h" > > #ifdef __GNUC__ > #pragma GCC diagnostic pop > #pragma GCC diagnostic pop > #endif > > > #ifdef __GNUC__ > #pragma GCC diagnostic ignored "-Wunused-parameter" > #endif > > #include "funcapi.h" > > #ifdef __GNUC__ > #pragma GCC diagnostic pop > #endif > Wow, that's pretty ugly. But it's useful to know that it is available in a pinch. Thanks! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company